summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-01 15:08:59 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-01 15:08:59 +0100
commite86839fac19753d0fa4006296c7f8909fe781013 (patch)
treef65f6ae403736fb48012a9334a95730f88e2ae1e /indra/llcharacter/lljoint.cpp
parent39bcae574f410f93d26c95ec2398f3653678e997 (diff)
SL-915 - WIP on dynamic joint box tracking
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rw-r--r--indra/llcharacter/lljoint.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 07fcd99701..68355cbbdc 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -97,6 +97,46 @@ void LLVector3OverrideMap::clear()
}
//-----------------------------------------------------------------------------
+// LLJointRiggingInfo
+//-----------------------------------------------------------------------------
+LLJointRiggingInfo::LLJointRiggingInfo()
+{
+ mRiggedExtents[0].clear();
+ mRiggedExtents[1].clear();
+ mIsRiggedTo = false;
+}
+
+bool LLJointRiggingInfo::isRiggedTo() const
+{
+ return mIsRiggedTo;
+}
+
+void LLJointRiggingInfo::setIsRiggedTo(bool val)
+{
+ mIsRiggedTo = val;
+}
+
+LLVector4a *LLJointRiggingInfo::getRiggedExtents()
+{
+ return mRiggedExtents;
+}
+
+const LLVector4a *LLJointRiggingInfo::getRiggedExtents() const
+{
+ return mRiggedExtents;
+}
+
+// Combine two rigging info states.
+// - isRiggedTo if either of the source infos are rigged to
+// - box is union of the two sources
+void LLJointRiggingInfo::merge(const LLJointRiggingInfo& other)
+{
+ mIsRiggedTo = mIsRiggedTo || other.mIsRiggedTo;
+ update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[0]);
+ update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[1]);
+}
+
+//-----------------------------------------------------------------------------
// LLJoint()
// Class Constructor
//-----------------------------------------------------------------------------
@@ -598,6 +638,19 @@ void LLJoint::showAttachmentPosOverrides(const std::string& av_info) const
}
//--------------------------------------------------------------------
+// getRiggingInfo()
+//--------------------------------------------------------------------
+LLJointRiggingInfo& LLJoint::getRiggingInfo()
+{
+ return mRiggingInfo;
+}
+
+const LLJointRiggingInfo& LLJoint::getRiggingInfo() const
+{
+ return mRiggingInfo;
+}
+
+//--------------------------------------------------------------------
// updatePos()
//--------------------------------------------------------------------
void LLJoint::updatePos(const std::string& av_info)