diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-07-20 21:54:19 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-07-20 21:54:19 +0800 |
| commit | 4cf12a6d223a238ff30f8b334ca91836c7369f88 (patch) | |
| tree | a2bf8fa27e5fff8a1b8a75cdb5d835f4e959f145 /indra/llprimitive/llmodel.cpp | |
| parent | 13f24f2419edeefbda8bedab01fad21cb97b7445 (diff) | |
| parent | 569d97707459d5f87cb04a0811c0b7eb1b5c2251 (diff) | |
Merge branch 'main' into webrtc-voice
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
| -rw-r--r-- | indra/llprimitive/llmodel.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 236cef9c3f..d21c6e974a 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] ); + LLVector4a pivot(pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ]); - for (std::vector<LLVolumeFace>::iterator faceIt = mVolumeFaces.begin(); faceIt != mVolumeFaces.end(); ) + 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; |
