summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-06-05 23:21:30 +0530
committerAnchor Linden <anchor@lindenlab.com>2018-06-05 23:21:30 +0530
commit6e1cbd04b43ad779afcd562cdaefe8a8c179ed06 (patch)
tree2cb1b5ba8ab5d73f9d96bc804bdb006afda6a7f6 /indra/llprimitive
parent809e5563db244a8d1af617b6dcf90f3eebb7f691 (diff)
parent40d4e8b2e6d25a625c7a5ef5dd3e94321d18ce82 (diff)
Merge
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmaterialid.cpp5
-rw-r--r--indra/llprimitive/llmaterialid.h1
-rw-r--r--indra/llprimitive/llprimitive.cpp10
-rw-r--r--indra/llprimitive/llprimitive.h5
4 files changed, 21 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp
index 820f62c43c..f88a607c4f 100644
--- a/indra/llprimitive/llmaterialid.cpp
+++ b/indra/llprimitive/llmaterialid.cpp
@@ -61,6 +61,11 @@ LLMaterialID::LLMaterialID(const LLMaterialID& pOtherMaterialID)
copyFromOtherMaterialID(pOtherMaterialID);
}
+LLMaterialID::LLMaterialID(const LLUUID& lluid)
+{
+ set(lluid.mData);
+}
+
LLMaterialID::~LLMaterialID()
{
}
diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h
index b4c82d3b7b..ee663f8f99 100644
--- a/indra/llprimitive/llmaterialid.h
+++ b/indra/llprimitive/llmaterialid.h
@@ -40,6 +40,7 @@ public:
LLMaterialID(const LLSD::Binary& pMaterialID);
LLMaterialID(const void* pMemory);
LLMaterialID(const LLMaterialID& pOtherMaterialID);
+ LLMaterialID(const LLUUID& lluid);
~LLMaterialID();
bool operator == (const LLMaterialID& pOtherMaterialID) const;
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 6aa6493303..287da346d6 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -732,6 +732,16 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
+ if (NO_LOD == detail)
+ {
+ // build the new object
+ setChanged(GEOMETRY);
+ sVolumeManager->unrefVolume(mVolumep);
+ mVolumep = new LLVolume(volume_params, 1, TRUE, TRUE);
+ setNumTEs(mVolumep->getNumFaces());
+ return FALSE;
+ }
+
LLVolume *volumep;
if (unique_volume)
{
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 05dbca67c1..22d6ade6ac 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -489,6 +489,11 @@ protected:
public:
static LLVolumeMgr* sVolumeManager;
+
+ enum
+ {
+ NO_LOD = -1
+ };
};
inline BOOL LLPrimitive::isAvatar() const