diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:12:26 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:12:26 +0300 |
commit | dfc117554689025f6ae1d568071b3d8b559c6b11 (patch) | |
tree | 4f54f0678296057faf38f03a9013cb180ca567c2 /indra/llprimitive | |
parent | 062f19027ec724f1a98380a58c688aa15e7f2b11 (diff) | |
parent | 9dba9f80f4d40ec12a735ddbb66a9d103a959ece (diff) |
Merge branch 'master' into DRTVWR-565-maint-P
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 2 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 8 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 7a138578a5..752a850d42 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -2580,7 +2580,7 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo if (!mNoOptimize) { - ret->optimizeVolumeFaces(); + ret->remapVolumeFaces(); } volume_faces = remainder.size(); diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index b1d371a399..285c5f656b 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -107,6 +107,14 @@ void LLModel::offsetMesh( const LLVector3& pivotPoint ) } } +void LLModel::remapVolumeFaces() +{ + for (U32 i = 0; i < getNumVolumeFaces(); ++i) + { + mVolumeFaces[i].remap(); + } +} + void LLModel::optimizeVolumeFaces() { for (U32 i = 0; i < getNumVolumeFaces(); ++i) diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 599f19a2a3..9a3a8b66a9 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -186,6 +186,7 @@ public: void sortVolumeFacesByMaterialName(); void normalizeVolumeFaces(); void trimVolumeFacesToSize(U32 new_count = LL_SCULPT_MESH_MAX_FACES, LLVolume::face_list_t* remainder = NULL); + void remapVolumeFaces(); void optimizeVolumeFaces(); void offsetMesh( const LLVector3& pivotPoint ); void getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out); |