diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-27 16:56:53 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-27 16:56:53 -0800 |
commit | e2ce144129e53ca7c6f5309cab833d48cdb30b11 (patch) | |
tree | 7f9e37b4a9c49d47f57ad916cfdfd03924ef790c /indra/llprimitive/llmaterialid.cpp | |
parent | cc9d5c9a3a5a3dec0811eb66fe4d7a716c436e2f (diff) |
First pass at re-implementing the POST functionality to query values for selected visible objects.
Diffstat (limited to 'indra/llprimitive/llmaterialid.cpp')
-rw-r--r-- | indra/llprimitive/llmaterialid.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp index 8122b70c2d..7df23e5ee0 100644 --- a/indra/llprimitive/llmaterialid.cpp +++ b/indra/llprimitive/llmaterialid.cpp @@ -100,6 +100,17 @@ void LLMaterialID::clear() memset(mID, 0, MATERIAL_ID_SIZE * sizeof(U8)); } +LLSD LLMaterialID::asLLSD() const +{ + LLSD::Binary materialIDBinary; + + materialIDBinary.resize(MATERIAL_ID_SIZE * sizeof(U8)); + memcpy(materialIDBinary.data(), mID, MATERIAL_ID_SIZE * sizeof(U8)); + + LLSD materialID = materialIDBinary; + return materialID; +} + void LLMaterialID::parseFromBinary (const LLSD::Binary& pMaterialID) { llassert(pMaterialID.size() == (MATERIAL_ID_SIZE * sizeof(U8))); |