summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-03-14 18:02:25 -0400
committerprep <prep@lindenlab.com>2011-03-14 18:02:25 -0400
commit16ff50719055aae202011e4b20aeae41d98493fa (patch)
tree9afc5affdc3821f0896bb041f52d792a8ef73cec /indra/llprimitive
parent3559789967513a1f3eecf1bc1ad38d9b073cb296 (diff)
WIP:Added pelvis offset to skinning info
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-xindra/llprimitive/llmodel.cpp4
-rwxr-xr-xindra/llprimitive/llmodel.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index a9101378a4..eed82f924b 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -57,6 +57,7 @@ const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
LLModel::LLModel(LLVolumeParams& params, F32 detail)
: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0)
+ , mPelvisOffset( 0.0f )
{
mDecompID = -1;
}
@@ -1497,6 +1498,7 @@ LLSD LLModel::writeModel(
}
}
+
if ( upload_joints && high->mAlternateBindMatrix.size() > 0 )
{
for (U32 i = 0; i < high->mJointList.size(); ++i)
@@ -1509,6 +1511,8 @@ LLSD LLModel::writeModel(
}
}
}
+
+ mdl["skin"]["pelvis_offset"] = high->mPelvisOffset;
}
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index c10ca1c11b..e9e33bdee5 100755
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -194,6 +194,7 @@ public:
LLVector3 mNormalizedScale;
LLVector3 mNormalizedTranslation;
+ float mPelvisOffset;
// convex hull decomposition
S32 mDecompID;
convex_hull_decomposition mConvexHullDecomp;