diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-02 15:39:10 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-02 15:39:10 -0400 |
| commit | 44eaaa507cf96c1e456fe48fd6969c6ace66b919 (patch) | |
| tree | f39536623c5f9fff80ef94bd15d3a6f21ef10403 /indra/llprimitive/llmodel.cpp | |
| parent | 2c1647e84cfb3fd712f665cdc77a772deb80aff9 (diff) | |
| parent | f69ac40e24e78fe265c81ff3785c185229764151 (diff) | |
Merge remote-tracking branch 'release/maint-b' into nat/maint-b-tests
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
| -rw-r--r-- | indra/llprimitive/llmodel.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 7b0d2632aa..9c7a7c29fc 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -91,19 +91,15 @@ std::string LLModel::getStatusString(U32 status) } -void LLModel::offsetMesh( const LLVector3& pivotPoint ) +void LLModel::offsetMesh(const LLVector3& pivotPoint) { - LLVector4a pivot( pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ] ); - - for (std::vector<LLVolumeFace>::iterator faceIt = mVolumeFaces.begin(); faceIt != mVolumeFaces.end(); ) + LLVector4a pivot(pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ]); + + for (LLVolumeFace& face : mVolumeFaces) { - std::vector<LLVolumeFace>:: iterator currentFaceIt = faceIt++; - LLVolumeFace& face = *currentFaceIt; - LLVector4a *pos = (LLVector4a*) face.mPositions; - - for (U32 i=0; i<face.mNumVertices; ++i ) + for (U32 i = 0; i < face.mNumVertices; ++i) { - pos[i].add( pivot ); + face.mPositions[i].add(pivot); } } } @@ -338,7 +334,7 @@ void LLModel::normalizeVolumeFaces() } } -void LLModel::getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out) +void LLModel::getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out) const { scale_out = mNormalizedScale; translation_out = mNormalizedTranslation; |
