diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
commit | b273edd1253e088ea864d399342a0cba2fd0aaa9 (patch) | |
tree | 317ff7c05eacccb80b3fe06d65d8f64d7ff6019d /indra/llappearance/llpolymorph.cpp | |
parent | da72081582c3fd376e228cf0fceaef2ecb1948a9 (diff) | |
parent | c6fc951f34c665d0f1cd6dcff1bea114fb0ff1a0 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/llappearance/llpolymorph.cpp')
-rw-r--r-- | indra/llappearance/llpolymorph.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 84dd6156a9..965b999bd4 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -363,18 +363,16 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) setWeight(getDefaultWeight()); LLAvatarAppearance* avatarp = mMesh->getAvatar(); - LLPolyMorphTargetInfo::volume_info_list_t::iterator iter; - for (iter = getInfo()->mVolumeInfoList.begin(); iter != getInfo()->mVolumeInfoList.end(); iter++) + for (LLPolyVolumeMorphInfo& volume_info : getInfo()->mVolumeInfoList) { - LLPolyVolumeMorphInfo *volume_info = &(*iter); for (S32 i = 0; i < avatarp->mNumCollisionVolumes; i++) { - if (avatarp->mCollisionVolumes[i].getName() == volume_info->mName) + if (avatarp->mCollisionVolumes[i].getName() == volume_info.mName) { mVolumeMorphs.push_back( LLPolyVolumeMorph(&avatarp->mCollisionVolumes[i], - volume_info->mScale, - volume_info->mPos)); + volume_info.mScale, + volume_info.mPos)); break; } } @@ -641,15 +639,14 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) } // now apply volume changes - for( volume_list_t::iterator iter = mVolumeMorphs.begin(); iter != mVolumeMorphs.end(); iter++ ) + for(LLPolyVolumeMorph& volume_morph : mVolumeMorphs) { - LLPolyVolumeMorph* volume_morph = &(*iter); - LLVector3 scale_delta = volume_morph->mScale * delta_weight; - LLVector3 pos_delta = volume_morph->mPos * delta_weight; + LLVector3 scale_delta = volume_morph.mScale * delta_weight; + LLVector3 pos_delta = volume_morph.mPos * delta_weight; - volume_morph->mVolume->setScale(volume_morph->mVolume->getScale() + scale_delta); + volume_morph.mVolume->setScale(volume_morph.mVolume->getScale() + scale_delta); // SL-315 - volume_morph->mVolume->setPosition(volume_morph->mVolume->getPosition() + pos_delta); + volume_morph.mVolume->setPosition(volume_morph.mVolume->getPosition() + pos_delta); } } @@ -735,15 +732,14 @@ void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S3 void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight) { // now apply volume changes - for( volume_list_t::iterator iter = mVolumeMorphs.begin(); iter != mVolumeMorphs.end(); iter++ ) + for(LLPolyVolumeMorph& volume_morph : mVolumeMorphs) { - LLPolyVolumeMorph* volume_morph = &(*iter); - LLVector3 scale_delta = volume_morph->mScale * delta_weight; - LLVector3 pos_delta = volume_morph->mPos * delta_weight; + LLVector3 scale_delta = volume_morph.mScale * delta_weight; + LLVector3 pos_delta = volume_morph.mPos * delta_weight; - volume_morph->mVolume->setScale(volume_morph->mVolume->getScale() + scale_delta); + volume_morph.mVolume->setScale(volume_morph.mVolume->getScale() + scale_delta); // SL-315 - volume_morph->mVolume->setPosition(volume_morph->mVolume->getPosition() + pos_delta); + volume_morph.mVolume->setPosition(volume_morph.mVolume->getPosition() + pos_delta); } } |