summaryrefslogtreecommitdiff
path: root/indra/llappearance/llpolymorph.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-12-05 17:40:04 -0500
committerOz Linden <oz@lindenlab.com>2016-12-05 17:40:04 -0500
commit295a4c63b4912f05a729178e8e34ba26e92ff37b (patch)
tree19fc1232fc6f8040ce5598fdd9649646116f7ea9 /indra/llappearance/llpolymorph.cpp
parent2d8ad89f33e9fa65dea11fd4c78962fc568ee00a (diff)
parent05d58c91ef55fd90ea2f3e0f1a1199ac5e690b30 (diff)
merge changes for 5.0.0-release
Diffstat (limited to 'indra/llappearance/llpolymorph.cpp')
-rw-r--r--indra/llappearance/llpolymorph.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index e3992a080e..2cb4c65d7c 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -369,7 +369,8 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
{
if (avatarp->mCollisionVolumes[i].getName() == volume_info->mName)
{
- mVolumeMorphs.push_back(LLPolyVolumeMorph(&avatarp->mCollisionVolumes[i],
+ mVolumeMorphs.push_back(
+ LLPolyVolumeMorph(&avatarp->mCollisionVolumes[i],
volume_info->mScale,
volume_info->mPos));
break;
@@ -647,6 +648,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
LLVector3 pos_delta = volume_morph->mPos * delta_weight;
volume_morph->mVolume->setScale(volume_morph->mVolume->getScale() + scale_delta);
+ // SL-315
volume_morph->mVolume->setPosition(volume_morph->mVolume->getPosition() + pos_delta);
}
}
@@ -730,6 +732,20 @@ void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S3
apply(mLastSex);
}
+void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight)
+{
+ // now apply volume changes
+ for( volume_list_t::iterator iter = mVolumeMorphs.begin(); iter != mVolumeMorphs.end(); iter++ )
+ {
+ LLPolyVolumeMorph* volume_morph = &(*iter);
+ 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);
+ // SL-315
+ volume_morph->mVolume->setPosition(volume_morph->mVolume->getPosition() + pos_delta);
+ }
+}
//-----------------------------------------------------------------------------
// LLPolyVertexMask()