diff options
Diffstat (limited to 'linden/indra/llcharacter/llpose.cpp')
-rw-r--r-- | linden/indra/llcharacter/llpose.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linden/indra/llcharacter/llpose.cpp b/linden/indra/llcharacter/llpose.cpp index e74517f..3a6a221 100644 --- a/linden/indra/llcharacter/llpose.cpp +++ b/linden/indra/llcharacter/llpose.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -54,7 +54,7 @@ LLPose::~LLPose() | |||
54 | //----------------------------------------------------------------------------- | 54 | //----------------------------------------------------------------------------- |
55 | // getFirstJointState() | 55 | // getFirstJointState() |
56 | //----------------------------------------------------------------------------- | 56 | //----------------------------------------------------------------------------- |
57 | LLJointState *LLPose::getFirstJointState() | 57 | LLJointState* LLPose::getFirstJointState() |
58 | { | 58 | { |
59 | mListIter = mJointMap.begin(); | 59 | mListIter = mJointMap.begin(); |
60 | if (mListIter == mJointMap.end()) | 60 | if (mListIter == mJointMap.end()) |
@@ -86,7 +86,7 @@ LLJointState *LLPose::getNextJointState() | |||
86 | //----------------------------------------------------------------------------- | 86 | //----------------------------------------------------------------------------- |
87 | // addJointState() | 87 | // addJointState() |
88 | //----------------------------------------------------------------------------- | 88 | //----------------------------------------------------------------------------- |
89 | BOOL LLPose::addJointState(LLJointState *jointState) | 89 | BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState) |
90 | { | 90 | { |
91 | if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end()) | 91 | if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end()) |
92 | { | 92 | { |
@@ -98,7 +98,7 @@ BOOL LLPose::addJointState(LLJointState *jointState) | |||
98 | //----------------------------------------------------------------------------- | 98 | //----------------------------------------------------------------------------- |
99 | // removeJointState() | 99 | // removeJointState() |
100 | //----------------------------------------------------------------------------- | 100 | //----------------------------------------------------------------------------- |
101 | BOOL LLPose::removeJointState(LLJointState *jointState) | 101 | BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState) |
102 | { | 102 | { |
103 | mJointMap.erase(jointState->getJoint()->getName()); | 103 | mJointMap.erase(jointState->getJoint()->getName()); |
104 | return TRUE; | 104 | return TRUE; |
@@ -199,7 +199,7 @@ LLJointStateBlender::~LLJointStateBlender() | |||
199 | //----------------------------------------------------------------------------- | 199 | //----------------------------------------------------------------------------- |
200 | // addJointState() | 200 | // addJointState() |
201 | //----------------------------------------------------------------------------- | 201 | //----------------------------------------------------------------------------- |
202 | BOOL LLJointStateBlender::addJointState(LLJointState *joint_state, S32 priority, BOOL additive_blend) | 202 | BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_state, S32 priority, BOOL additive_blend) |
203 | { | 203 | { |
204 | llassert(joint_state); | 204 | llassert(joint_state); |
205 | 205 | ||
@@ -209,7 +209,7 @@ BOOL LLJointStateBlender::addJointState(LLJointState *joint_state, S32 priority, | |||
209 | 209 | ||
210 | for(S32 i = 0; i < JSB_NUM_JOINT_STATES; i++) | 210 | for(S32 i = 0; i < JSB_NUM_JOINT_STATES; i++) |
211 | { | 211 | { |
212 | if (NULL == mJointStates[i]) | 212 | if (mJointStates[i].isNull()) |
213 | { | 213 | { |
214 | mJointStates[i] = joint_state; | 214 | mJointStates[i] = joint_state; |
215 | mPriorities[i] = priority; | 215 | mPriorities[i] = priority; |
@@ -246,7 +246,7 @@ void LLJointStateBlender::blendJointStates(BOOL apply_now) | |||
246 | // we need at least one joint to blend | 246 | // we need at least one joint to blend |
247 | // if there is one, it will be in slot zero according to insertion logic | 247 | // if there is one, it will be in slot zero according to insertion logic |
248 | // instead of resetting joint state to default, just leave it unchanged from last frame | 248 | // instead of resetting joint state to default, just leave it unchanged from last frame |
249 | if (NULL == mJointStates[0]) | 249 | if (mJointStates[0].isNull()) |
250 | { | 250 | { |
251 | return; | 251 | return; |
252 | } | 252 | } |
@@ -275,7 +275,7 @@ void LLJointStateBlender::blendJointStates(BOOL apply_now) | |||
275 | sum_weights[SCALE_WEIGHT] = 0.f; | 275 | sum_weights[SCALE_WEIGHT] = 0.f; |
276 | 276 | ||
277 | for(S32 joint_state_index = 0; | 277 | for(S32 joint_state_index = 0; |
278 | joint_state_index < JSB_NUM_JOINT_STATES && mJointStates[joint_state_index] != NULL; | 278 | joint_state_index < JSB_NUM_JOINT_STATES && mJointStates[joint_state_index].notNull(); |
279 | joint_state_index++) | 279 | joint_state_index++) |
280 | { | 280 | { |
281 | LLJointState* jsp = mJointStates[joint_state_index]; | 281 | LLJointState* jsp = mJointStates[joint_state_index]; |
@@ -468,7 +468,7 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion) | |||
468 | { | 468 | { |
469 | LLPose* pose = motion->getPose(); | 469 | LLPose* pose = motion->getPose(); |
470 | 470 | ||
471 | for(LLJointState *jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) | 471 | for(LLJointState* jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) |
472 | { | 472 | { |
473 | LLJoint *jointp = jsp->getJoint(); | 473 | LLJoint *jointp = jsp->getJoint(); |
474 | LLJointStateBlender* joint_blender; | 474 | LLJointStateBlender* joint_blender; |