summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-15 14:29:39 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-15 14:29:39 -0500
commitb1884d40f5ba74d1d39be1abad7dc416905c6caf (patch)
treeb3b35a6f4aebe3292caf2700d86dcfbb2a4a2774 /indra/llcharacter
parent9c4397b6ee6d1a2a2c43d5d886b178753a4833d8 (diff)
MAINT-4537 WIP - more joint position management during outfit changes
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-xindra/llcharacter/lljoint.cpp17
-rwxr-xr-xindra/llcharacter/lljoint.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index cab3a7d619..6615a430ab 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -89,6 +89,11 @@ bool LLPosOverrideMap::remove(const LLUUID& mesh_id)
return (remove_count > 0);
}
+void LLPosOverrideMap::clear()
+{
+ m_map.clear();
+}
+
//-----------------------------------------------------------------------------
// LLJoint()
// Class Constructor
@@ -368,6 +373,18 @@ bool LLJoint::hasAttachmentPosOverride( LLVector3& pos, LLUUID& mesh_id ) const
}
//--------------------------------------------------------------------
+// clearAttachmentPosOverrides()
+//--------------------------------------------------------------------
+void LLJoint::clearAttachmentPosOverrides()
+{
+ if (m_attachmentOverrides.count())
+ {
+ m_attachmentOverrides.clear();
+ setPosition(m_posBeforeOverrides);
+ }
+}
+
+//--------------------------------------------------------------------
// updatePos()
//--------------------------------------------------------------------
void LLJoint::updatePos(const std::string& av_info)
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 56da8e83b2..2abe1d6db1 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -55,6 +55,7 @@ public:
U32 count() const;
void add(const LLUUID& mesh_id, const LLVector3& pos);
bool remove(const LLUUID& mesh_id);
+ void clear();
private:
typedef std::map<LLUUID,LLVector3> map_type;
map_type m_map;
@@ -202,6 +203,7 @@ public:
void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info );
void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info );
bool hasAttachmentPosOverride( LLVector3& pos, LLUUID& mesh_id ) const;
+ void clearAttachmentPosOverrides();
//Accessor for the joint id
LLUUID getId( void ) { return mId; }