summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2015-10-27 15:33:21 -0700
committerAura Linden <aura@lindenlab.com>2015-10-27 15:33:21 -0700
commit07496b015b01899b21960b60d2f3af7bf317c349 (patch)
treef44564827e1570113457f2312ee23073135233bc /indra/llcharacter
parent97374a5362f097afd3027ea51757de2e36af4798 (diff)
parentcb64c3d3c3ca027fc49ef655e2ce0acecb3b230d (diff)
Pulled merge from bento prime.
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-xindra/llcharacter/lljoint.cpp22
-rwxr-xr-xindra/llcharacter/lljoint.h15
2 files changed, 36 insertions, 1 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 8fa08a2a6c..2c6278fe45 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -108,6 +108,7 @@ void LLJoint::init()
mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
mUpdateXform = TRUE;
+ mSupport = SUPPORT_BASE;
}
LLJoint::LLJoint() :
@@ -170,6 +171,27 @@ void LLJoint::setup(const std::string &name, LLJoint *parent)
}
//-----------------------------------------------------------------------------
+// setSupport()
+//-----------------------------------------------------------------------------
+void LLJoint::setSupport(const std::string& support_name)
+{
+ if (support_name == "extended")
+ {
+ setSupport(SUPPORT_EXTENDED);
+ }
+ else if (support_name == "base")
+ {
+ setSupport(SUPPORT_BASE);
+ }
+ else
+ {
+ LL_WARNS() << "unknown support string " << support_name << LL_ENDL;
+ setSupport(SUPPORT_BASE);
+ }
+}
+
+
+//-----------------------------------------------------------------------------
// touch()
// Sets all dirty flags for all children, recursively.
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index b3bf588d79..113742ad74 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -42,7 +42,7 @@
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
// BENTO JOINT COUNT LIMIT
const U32 LL_CHARACTER_MAX_JOINTS = 152; // must be divisible by 4!
-const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 152;
+const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 132;
// FIXME BENTO - these should be higher than the joint_num of any
// other joint, to avoid conflicts in updateMotionsByType()
@@ -91,9 +91,17 @@ public:
POSITION_DIRTY = 0x1 << 2,
ALL_DIRTY = 0x7
};
+public:
+ enum SupportCategory
+ {
+ SUPPORT_BASE,
+ SUPPORT_EXTENDED
+ };
protected:
std::string mName;
+ SupportCategory mSupport;
+
// parent joint
LLJoint *mParent;
@@ -144,6 +152,11 @@ public:
const std::string& getName() const { return mName; }
void setName( const std::string &name ) { mName = name; }
+ // get/set support
+ SupportCategory getSupport() const { return mSupport; }
+ void setSupport( const SupportCategory& support) { mSupport = support; }
+ void setSupport( const std::string& support_string);
+
// getParent
LLJoint *getParent() { return mParent; }