diff options
| author | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2018-11-27 17:45:45 +0200 |
|---|---|---|
| committer | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2018-11-27 17:45:45 +0200 |
| commit | 4ab4c4498a04576a3cddf3533359a15a636b53b6 (patch) | |
| tree | 064d6b7b40927a4b87803d6daf7f8db1a846ede6 /indra/llprimitive/llprimitive.cpp | |
| parent | acc86a9139872e182fbeb5b9fc7daa12c5d2c029 (diff) | |
| parent | c21396181b090b626d7a9f989bcead2e517bb75f (diff) | |
Merged lindenlab/viewer-cougar into default
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
| -rw-r--r-- | indra/llprimitive/llprimitive.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index edf7c41e40..c69c059880 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1609,6 +1609,8 @@ BOOL LLNetworkData::isValid(U16 param_type, U32 size) return (size == 17); case PARAMS_LIGHT_IMAGE: return (size == 28); + case PARAMS_EXTENDED_MESH: + return (size == 4); } return FALSE; @@ -2036,3 +2038,67 @@ bool LLLightImageParams::fromLLSD(LLSD& sd) return false; } + +//============================================================================ + +LLExtendedMeshParams::LLExtendedMeshParams() +{ + mType = PARAMS_EXTENDED_MESH; + mFlags = 0; +} + +BOOL LLExtendedMeshParams::pack(LLDataPacker &dp) const +{ + dp.packU32(mFlags, "flags"); + + return TRUE; +} + +BOOL LLExtendedMeshParams::unpack(LLDataPacker &dp) +{ + dp.unpackU32(mFlags, "flags"); + + return TRUE; +} + +bool LLExtendedMeshParams::operator==(const LLNetworkData& data) const +{ + if (data.mType != PARAMS_EXTENDED_MESH) + { + return false; + } + + const LLExtendedMeshParams *param = (const LLExtendedMeshParams*)&data; + if ( (param->mFlags != mFlags) ) + { + return false; + } + + return true; +} + +void LLExtendedMeshParams::copy(const LLNetworkData& data) +{ + const LLExtendedMeshParams *param = (LLExtendedMeshParams*)&data; + mFlags = param->mFlags; +} + +LLSD LLExtendedMeshParams::asLLSD() const +{ + LLSD sd; + + sd["flags"] = LLSD::Integer(mFlags); + + return sd; +} + +bool LLExtendedMeshParams::fromLLSD(LLSD& sd) +{ + if (sd.has("flags")) + { + setFlags( sd["flags"].asInteger()); + return true; + } + + return false; +} |
