summaryrefslogtreecommitdiff
path: root/indra/newview/llpolymesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpolymesh.cpp')
-rw-r--r--indra/newview/llpolymesh.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 6d6fb2fa0e..c1144958eb 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -49,6 +49,9 @@ extern LLControlGroup gSavedSettings; // read only
LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data,
const LLVector3 &direction,
const std::string &name);
+LLPolyMorphData *clone_morph_param_cleavage(const LLPolyMorphData *src_data,
+ F32 scale,
+ const std::string &name);
//-----------------------------------------------------------------------------
// Global table of loaded LLPolyMeshes
@@ -607,6 +610,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
mMorphData.insert(morph_data);
+ if (!strcmp(morphName, "Breast_Female_Cleavage"))
+ {
+ mMorphData.insert(clone_morph_param_cleavage(morph_data,
+ 0.5f,
+ "Breast_Physics_LeftRight_Driven"));
+ }
+
if (!strcmp(morphName, "Big_Belly_Torso"))
{
mMorphData.insert(clone_morph_param(morph_data,
@@ -1212,4 +1222,25 @@ LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data,
return cloned_morph_data;
}
+LLPolyMorphData *clone_morph_param_cleavage(const LLPolyMorphData *src_data,
+ F32 scale,
+ const std::string &name)
+{
+ LLPolyMorphData* cloned_morph_data = new LLPolyMorphData(*src_data);
+ cloned_morph_data->mName = name;
+ for (U32 v=0; v < cloned_morph_data->mNumIndices; v++)
+ {
+ cloned_morph_data->mCoords[v] = src_data->mCoords[v]*scale;
+ cloned_morph_data->mNormals[v] = src_data->mNormals[v]*scale;
+ cloned_morph_data->mBinormals[v] = src_data->mBinormals[v]*scale;
+ if (cloned_morph_data->mCoords[v][1] < 0)
+ {
+ cloned_morph_data->mCoords[v][1] *= -1;
+ cloned_morph_data->mNormals[v][1] *= -1;
+ cloned_morph_data->mBinormals[v][1] *= -1;
+ }
+ }
+ return cloned_morph_data;
+}
+
// End