From 9d77e030d9a0d23cebce616631677459eec1612c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Nov 2012 23:52:27 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system cleaning up build moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc streamlined Time class and consolidated functionality in BlockTimer class llfasttimer is no longer included via llstring.h, so had to add it manually in several places --- indra/llcharacter/llcharacter.cpp | 1 + indra/llcharacter/lljoint.h | 1 + indra/llcharacter/llmotioncontroller.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 0a6a8f9fa6..5138be0711 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -32,6 +32,7 @@ #include "llcharacter.h" #include "llstring.h" +#include "llfasttimer.h" #define SKEL_HEADER "Linden Skeleton 1.0" diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index dc3c58cf64..a9cde545f2 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -31,6 +31,7 @@ // Header Files //----------------------------------------------------------------------------- #include +#include #include "linked_lists.h" #include "v3math.h" diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 829dda9993..5524bba296 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -28,8 +28,9 @@ // Header Files //----------------------------------------------------------------------------- #include "linden_common.h" - #include "llmotioncontroller.h" + +#include "llfasttimer.h" #include "llkeyframemotion.h" #include "llmath.h" #include "lltimer.h" -- cgit v1.2.3 From 8de397b19ec9e2f6206fd5ae57dba96c70e78b74 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 18 Mar 2013 08:43:03 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed LLCriticalDamp to LLSmoothInterpolation and sped up interpolator lookup improvements to stats display of llstatbar added scene load stats floater accessed with ctrl|shift|2 --- indra/llcharacter/lleditingmotion.cpp | 2 +- indra/llcharacter/llheadrotmotion.cpp | 4 ++-- indra/llcharacter/llkeyframemotion.cpp | 8 ++++---- indra/llcharacter/llkeyframewalkmotion.cpp | 10 +++++----- indra/llcharacter/llmotion.cpp | 4 ++-- indra/llcharacter/lltargetingmotion.cpp | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 0d0b85ba60..ff7ad1c289 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -232,7 +232,7 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) mIKSolver.solve(); // use blending... - F32 slerp_amt = LLCriticalDamp::getInterpolant(TARGET_LAG_HALF_LIFE); + F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TARGET_LAG_HALF_LIFE); shoulderRot = slerp(slerp_amt, mShoulderJoint.getRotation(), shoulderRot); elbowRot = slerp(slerp_amt, mElbowJoint.getRotation(), elbowRot); diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 15a58a8389..4a8af2f00c 100644 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -182,8 +182,8 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) LLQuaternion currentRootRotWorld = mRootJoint->getWorldRotation(); LLQuaternion currentInvRootRotWorld = ~currentRootRotWorld; - F32 head_slerp_amt = LLCriticalDamp::getInterpolant(HEAD_LOOKAT_LAG_HALF_LIFE); - F32 torso_slerp_amt = LLCriticalDamp::getInterpolant(TORSO_LOOKAT_LAG_HALF_LIFE); + F32 head_slerp_amt = LLSmoothInterpolation::getInterpolant(HEAD_LOOKAT_LAG_HALF_LIFE); + F32 torso_slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_LOOKAT_LAG_HALF_LIFE); LLVector3* targetPos = (LLVector3*)mCharacter->getAnimationData("LookAtPoint"); diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index c6f45bffa2..831a0a6719 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1031,11 +1031,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 if (constraint->mSharedData->mChainLength != 0 && dist_vec_squared(root_pos, target_pos) * 0.95f > constraint->mTotalLength * constraint->mTotalLength) { - constraint->mWeight = lerp(constraint->mWeight, 0.f, LLCriticalDamp::getInterpolant(0.1f)); + constraint->mWeight = LLSmoothInterpolation::lerp(constraint->mWeight, 0.f, 0.1f); } else { - constraint->mWeight = lerp(constraint->mWeight, 1.f, LLCriticalDamp::getInterpolant(0.3f)); + constraint->mWeight = LLSmoothInterpolation::lerp(constraint->mWeight, 1.f, 0.3f); } F32 weight = constraint->mWeight * ((shared_data->mEaseOutStopTime == 0.f) ? 1.f : @@ -1082,9 +1082,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // convert intermediate joint positions to world coordinates positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition(); F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f); -// llinfos << "Interpolant " << LLCriticalDamp::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// llinfos << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; positions[joint_num] = lerp(positions[joint_num], kinematic_position, - LLCriticalDamp::getInterpolant(time_constant, FALSE)); + LLSmoothInterpolation::getInterpolant(time_constant, FALSE)); } S32 iteration_count; diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index d52eb89a5c..e188b06c03 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -258,7 +258,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // but this will cause the animation playback rate calculation below to // kick in too slowly and sometimes start playing the animation in reverse. - //mPelvisOffset -= PELVIS_COMPENSATION_WIEGHT * (foot_slip_vector * world_to_avatar_rot);//lerp(LLVector3::zero, -1.f * (foot_slip_vector * world_to_avatar_rot), LLCriticalDamp::getInterpolant(0.1f)); + //mPelvisOffset -= PELVIS_COMPENSATION_WIEGHT * (foot_slip_vector * world_to_avatar_rot);//lerp(LLVector3::zero, -1.f * (foot_slip_vector * world_to_avatar_rot), LLSmoothInterpolation::getInterpolant(0.1f)); ////F32 drift_comp_max = DRIFT_COMP_MAX_TOTAL * (llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED); //F32 drift_comp_max = DRIFT_COMP_MAX_TOTAL; @@ -287,7 +287,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 desired_speed_multiplier = llclamp(speed / foot_speed, min_speed_multiplier, ANIM_SPEED_MAX); // blend towards new speed adjustment value - F32 new_speed_adjust = lerp(mAdjustedSpeed, desired_speed_multiplier, LLCriticalDamp::getInterpolant(SPEED_ADJUST_TIME_CONSTANT)); + F32 new_speed_adjust = LLSmoothInterpolation::lerp(mAdjustedSpeed, desired_speed_multiplier, SPEED_ADJUST_TIME_CONSTANT); // limit that rate at which the speed adjustment changes F32 speedDelta = llclamp(new_speed_adjust - mAdjustedSpeed, -SPEED_ADJUST_MAX_SEC * delta_time, SPEED_ADJUST_MAX_SEC * delta_time); @@ -305,8 +305,8 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { // standing/turning // damp out speed adjustment to 0 - mAnimSpeed = lerp(mAnimSpeed, 1.f, LLCriticalDamp::getInterpolant(0.2f)); - //mPelvisOffset = lerp(mPelvisOffset, LLVector3::zero, LLCriticalDamp::getInterpolant(0.2f)); + mAnimSpeed = LLSmoothInterpolation::lerp(mAnimSpeed, 1.f, 0.2f); + //mPelvisOffset = lerp(mPelvisOffset, LLVector3::zero, LLSmoothInterpolation::getInterpolant(0.2f)); } // broadcast walk speed change @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = lerp(mRoll, target_roll, LLCriticalDamp::getInterpolant(0.1f)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp index 2551f125d0..af2e10220a 100644 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -73,7 +73,7 @@ void LLMotion::fadeOut() { if (mFadeWeight > 0.01f) { - mFadeWeight = lerp(mFadeWeight, 0.f, LLCriticalDamp::getInterpolant(0.15f)); + mFadeWeight = lerp(mFadeWeight, 0.f, LLSmoothInterpolation::getInterpolant(0.15f)); } else { @@ -88,7 +88,7 @@ void LLMotion::fadeIn() { if (mFadeWeight < 0.99f) { - mFadeWeight = lerp(mFadeWeight, 1.f, LLCriticalDamp::getInterpolant(0.15f)); + mFadeWeight = lerp(mFadeWeight, 1.f, LLSmoothInterpolation::getInterpolant(0.15f)); } else { diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index 489aef923c..633c1d51eb 100644 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -106,7 +106,7 @@ BOOL LLTargetingMotion::onActivate() //----------------------------------------------------------------------------- BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) { - F32 slerp_amt = LLCriticalDamp::getInterpolant(TORSO_TARGET_HALF_LIFE); + F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_TARGET_HALF_LIFE); LLVector3 target; LLVector3* lookAtPoint = (LLVector3*)mCharacter->getAnimationData("LookAtPoint"); -- cgit v1.2.3 From ae028e79872f166db8e514ca3b442c7807d6ebdb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 11 Apr 2013 19:08:57 -0700 Subject: removed unused data structures --- indra/llcharacter/llmotioncontroller.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 52eaf557b1..2bd5271c4f 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -34,7 +34,6 @@ #include #include -#include "lluuidhashmap.h" #include "llmotion.h" #include "llpose.h" #include "llframetimer.h" -- cgit v1.2.3 From 9fd3af3c389ed491b515cbb5136b344b069913e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Jun 2013 15:29:15 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed Units macros and argument order to make it more clear optimized units for integer types fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index e188b06c03..c6ca0b542e 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); -- cgit v1.2.3 From ffa7123bb5187e1da491a8f475d696053d9c9ee4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 28 Jun 2013 20:45:20 -0700 Subject: SH-4299 FIX Interesting: High fps shown temporarily off scale in statistics console added ability to force uniqueness of LLCopyOnWritePointer converted more variables to units added convenience function for unit constants --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index c6ca0b542e..b627110da6 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnits::Milliseconds::fromValue(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llcharacter/llanimationstates.h | 2 +- indra/llcharacter/llcharacter.h | 2 +- indra/llcharacter/llgesture.cpp | 41 ++++------------- indra/llcharacter/llgesture.h | 17 ++++--- indra/llcharacter/lljoint.cpp | 2 +- indra/llcharacter/lljoint.h | 2 - indra/llcharacter/lljointsolverrp3.cpp | 74 +++++++++++++++---------------- indra/llcharacter/llkeyframemotion.cpp | 5 +-- indra/llcharacter/llkeyframemotionparam.h | 1 - indra/llcharacter/llmotion.cpp | 2 +- indra/llcharacter/llpose.h | 1 - 11 files changed, 58 insertions(+), 91 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 84185c3f92..79cbcabdc1 100755 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -29,7 +29,7 @@ #include -#include "string_table.h" +#include "llstringtable.h" #include "lluuid.h" //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 5740dbce77..43fb68bb5c 100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -35,7 +35,7 @@ #include "lljoint.h" #include "llmotioncontroller.h" #include "llvisualparam.h" -#include "string_table.h" +#include "llstringtable.h" #include "llpointer.h" #include "llthread.h" diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index c23694639e..aeb65eb10f 100755 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -173,27 +173,7 @@ S32 LLGesture::getMaxSerialSize() LLGestureList::LLGestureList() : mList(0) -{ - // add some gestures for debugging -// LLGesture *gesture = NULL; -/* - gesture = new LLGesture(KEY_F2, MASK_NONE, ":-)", - SND_CHIRP, "dance2", ":-)" ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F3, MASK_NONE, "/dance", - SND_OBJECT_CREATE, "dance3", "(dances)" ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F4, MASK_NONE, "/boogie", - LLUUID::null, "dance4", LLStringUtil::null ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F5, MASK_SHIFT, "/tongue", - LLUUID::null, "Express_Tongue_Out", LLStringUtil::null ); - mList.put(gesture); - */ -} +{} LLGestureList::~LLGestureList() { @@ -203,12 +183,7 @@ LLGestureList::~LLGestureList() void LLGestureList::deleteAll() { - S32 count = mList.count(); - for (S32 i = 0; i < count; i++) - { - delete mList.get(i); - } - mList.reset(); + delete_and_clear(mList); } // Iterates through space delimited tokens in string, triggering any gestures found. @@ -235,9 +210,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin std::string cur_token_lower = *token_iter; LLStringUtil::toLower(cur_token_lower); - for (S32 i = 0; i < mList.count(); i++) + for (U32 i = 0; i < mList.size(); i++) { - gesture = mList.get(i); + gesture = mList.at(i); if (gesture->trigger(cur_token_lower)) { if( !gesture->getOutputString().empty() ) @@ -286,9 +261,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin BOOL LLGestureList::trigger(KEY key, MASK mask) { - for (S32 i = 0; i < mList.count(); i++) + for (U32 i = 0; i < mList.size(); i++) { - LLGesture* gesture = mList.get(i); + LLGesture* gesture = mList.at(i); if( gesture ) { if (gesture->trigger(key, mask)) @@ -308,7 +283,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) U8 *LLGestureList::serialize(U8 *buffer) const { // a single S32 serves as the header that tells us how many to read - S32 count = mList.count(); + U32 count = mList.size(); htonmemcpy(buffer, &count, MVT_S32, 4); buffer += sizeof(count); @@ -345,7 +320,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) tmp += sizeof(count); - mList.reserve_block(count); + mList.resize(count); for (S32 i = 0; i < count; i++) { diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h index 66b618c473..cfb489f727 100755 --- a/indra/llcharacter/llgesture.h +++ b/indra/llcharacter/llgesture.h @@ -31,7 +31,6 @@ #include "llanimationstates.h" #include "lluuid.h" #include "llstring.h" -#include "lldarray.h" class LLGesture { @@ -67,12 +66,12 @@ public: static S32 getMaxSerialSize(); protected: - KEY mKey; // usually a function key - MASK mMask; // usually MASK_NONE, or MASK_SHIFT + KEY mKey; // usually a function key + MASK mMask; // usually MASK_NONE, or MASK_SHIFT std::string mTrigger; // string, no whitespace allowed std::string mTriggerLower; // lowercase version of mTrigger - LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none - std::string mAnimation; // canonical name of animation or face animation + LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none + std::string mAnimation; // canonical name of animation or face animation std::string mOutputString; // string to say static const S32 MAX_SERIAL_SIZE; @@ -91,9 +90,9 @@ public: BOOL triggerAndReviseString(const std::string &string, std::string* revised_string); // Used for construction from UI - S32 count() const { return mList.count(); } - virtual LLGesture* get(S32 i) const { return mList.get(i); } - virtual void put(LLGesture* gesture) { mList.put( gesture ); } + S32 count() const { return mList.size(); } + virtual LLGesture* get(S32 i) const { return mList.at(i); } + virtual void put(LLGesture* gesture) { mList.push_back( gesture ); } void deleteAll(); // non-endian-neutral serialization @@ -106,7 +105,7 @@ protected: virtual LLGesture *create_gesture(U8 **buffer, S32 max_size); protected: - LLDynamicArray mList; + std::vector mList; static const S32 SERIAL_HEADER_SIZE; }; diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 09a7c11a22..83bd62e8fa 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -560,7 +560,7 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot) // LLVector3 old_axis = main_axis * old_rot; // LLVector3 new_axis = main_axis * new_rot; -// for (S32 i = 0; i < mConstraintSilhouette.count() - 1; i++) +// for (S32 i = 0; i < mConstraintSilhouette.size() - 1; i++) // { // LLVector3 vert1 = mConstraintSilhouette[i]; // LLVector3 vert2 = mConstraintSilhouette[i + 1]; diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 07374b7814..6efa13aeb5 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -33,13 +33,11 @@ #include #include -#include "linked_lists.h" #include "v3math.h" #include "v4math.h" #include "m4math.h" #include "llquaternion.h" #include "xform.h" -#include "lldarray.h" const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15; const U32 LL_CHARACTER_MAX_JOINTS = 32; // must be divisible by 4! diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index 1331900791..69a7e3dc6e 100755 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -135,8 +135,6 @@ void LLJointSolverRP3::setTwist( F32 twist ) //----------------------------------------------------------------------------- void LLJointSolverRP3::solve() { -// llinfos << llendl; -// llinfos << "LLJointSolverRP3::solve()" << llendl; //------------------------------------------------------------------------- // setup joints in their base rotations @@ -152,15 +150,15 @@ void LLJointSolverRP3::solve() LLVector3 cPos = mJointC->getWorldPosition(); LLVector3 gPos = mJointGoal->getWorldPosition(); -// llinfos << "bPosLocal = " << mJointB->getPosition() << llendl; -// llinfos << "cPosLocal = " << mJointC->getPosition() << llendl; -// llinfos << "bRotLocal = " << mJointB->getRotation() << llendl; -// llinfos << "cRotLocal = " << mJointC->getRotation() << llendl; - -// llinfos << "aPos : " << aPos << llendl; -// llinfos << "bPos : " << bPos << llendl; -// llinfos << "cPos : " << cPos << llendl; -// llinfos << "gPos : " << gPos << llendl; + LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE + << "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE + << "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE + << "bRotLocal = " << mJointB->getRotation() << LL_NEWLINE + << "cRotLocal = " << mJointC->getRotation() << LL_NEWLINE + << "aPos : " << aPos << LL_NEWLINE + << "bPos : " << bPos << LL_NEWLINE + << "cPos : " << cPos << LL_NEWLINE + << "gPos : " << gPos << LL_ENDL; //------------------------------------------------------------------------- // get the poleVector in world space @@ -184,11 +182,6 @@ void LLJointSolverRP3::solve() LLVector3 acVec = cPos - aPos; LLVector3 agVec = gPos - aPos; -// llinfos << "abVec : " << abVec << llendl; -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "agVec : " << agVec << llendl; - //------------------------------------------------------------------------- // compute needed lengths of those vectors //------------------------------------------------------------------------- @@ -196,16 +189,19 @@ void LLJointSolverRP3::solve() F32 bcLen = bcVec.magVec(); F32 agLen = agVec.magVec(); -// llinfos << "abLen : " << abLen << llendl; -// llinfos << "bcLen : " << bcLen << llendl; -// llinfos << "agLen : " << agLen << llendl; - //------------------------------------------------------------------------- // compute component vector of (A->B) orthogonal to (A->C) //------------------------------------------------------------------------- LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec)); -// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl; + LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE + << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "agVec : " << agVec << LL_NEWLINE + << "abLen : " << abLen << LL_NEWLINE + << "bcLen : " << bcLen << LL_NEWLINE + << "agLen : " << agLen << LL_NEWLINE + << "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL; //------------------------------------------------------------------------- // compute the normal of the original ABC plane (and store for later) @@ -273,13 +269,17 @@ void LLJointSolverRP3::solve() LLQuaternion bRot(theta - abbcAng, abbcOrthoVec); -// llinfos << "abbcAng : " << abbcAng << llendl; -// llinfos << "abbcOrthoVec : " << abbcOrthoVec << llendl; -// llinfos << "agLenSq : " << agLenSq << llendl; -// llinfos << "cosTheta : " << cosTheta << llendl; -// llinfos << "theta : " << theta << llendl; -// llinfos << "bRot : " << bRot << llendl; -// llinfos << "theta abbcAng theta-abbcAng: " << theta*180.0/F_PI << " " << abbcAng*180.0f/F_PI << " " << (theta - abbcAng)*180.0f/F_PI << llendl; + LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE + << "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE + << "agLenSq : " << agLenSq << LL_NEWLINE + << "cosTheta : " << cosTheta << LL_NEWLINE + << "theta : " << theta << LL_NEWLINE + << "bRot : " << bRot << LL_NEWLINE + << "theta abbcAng theta-abbcAng: " + << theta*180.0/F_PI << " " + << abbcAng*180.0f/F_PI << " " + << (theta - abbcAng)*180.0f/F_PI + << LL_ENDL; //------------------------------------------------------------------------- // compute rotation that rotates new A->C to A->G @@ -293,9 +293,9 @@ void LLJointSolverRP3::solve() LLQuaternion cgRot; cgRot.shortestArc( acVec, agVec ); -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "cgRot : " << cgRot << llendl; + LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "cgRot : " << cgRot << LL_ENDL; // update A->B and B->C with rotation from C to G abVec = abVec * cgRot; @@ -353,18 +353,16 @@ void LLJointSolverRP3::solve() pRot.shortestArc( abcNorm, apgNorm ); } -// llinfos << "abcNorm = " << abcNorm << llendl; -// llinfos << "apgNorm = " << apgNorm << llendl; -// llinfos << "pRot = " << pRot << llendl; - //------------------------------------------------------------------------- // compute twist rotation //------------------------------------------------------------------------- LLQuaternion twistRot( mTwist, agVec ); -// llinfos << "twist : " << mTwist*180.0/F_PI << llendl; -// llinfos << "agNormVec: " << agNormVec << llendl; -// llinfos << "twistRot : " << twistRot << llendl; + LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE + << "apgNorm = " << apgNorm << LL_NEWLINE + << "pRot = " << pRot << LL_NEWLINE + << "twist : " << mTwist*180.0/F_PI << LL_NEWLINE + << "twistRot : " << twistRot << LL_ENDL; //------------------------------------------------------------------------- // compute rotation of A diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 831a0a6719..1352c9d592 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1263,7 +1263,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (mJointMotionList->mBasePriority >= LLJoint::ADDITIVE_PRIORITY) { - mJointMotionList->mBasePriority = (LLJoint::JointPriority)((int)LLJoint::ADDITIVE_PRIORITY-1); + mJointMotionList->mBasePriority = (LLJoint::JointPriority)((S32)LLJoint::ADDITIVE_PRIORITY-1); mJointMotionList->mMaxPriority = mJointMotionList->mBasePriority; } else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY) @@ -2288,8 +2288,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh mTargetVolume = NULL; mFixupDistanceRMS = 0.f; - int i; - for (i=0; i -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/llcharacter/llbvhloader.cpp | 44 +++---- indra/llcharacter/llcharacter.cpp | 32 ++--- indra/llcharacter/lleditingmotion.cpp | 10 +- indra/llcharacter/llgesture.cpp | 16 +-- indra/llcharacter/llhandmotion.cpp | 4 +- indra/llcharacter/llheadrotmotion.cpp | 22 ++-- indra/llcharacter/lljoint.cpp | 2 +- indra/llcharacter/llkeyframemotion.cpp | 174 ++++++++++++++-------------- indra/llcharacter/llkeyframemotionparam.cpp | 18 +-- indra/llcharacter/llkeyframestandmotion.cpp | 6 +- indra/llcharacter/llkeyframewalkmotion.cpp | 4 +- indra/llcharacter/llmotion.h | 8 +- indra/llcharacter/llmotioncontroller.cpp | 22 ++-- indra/llcharacter/llmultigesture.cpp | 28 ++--- indra/llcharacter/llstatemachine.cpp | 12 +- indra/llcharacter/lltargetingmotion.cpp | 2 +- indra/llcharacter/llvisualparam.cpp | 8 +- 17 files changed, 206 insertions(+), 206 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 2a0df26384..8ecd7d1090 100755 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -130,14 +130,14 @@ LLQuaternion::Order bvhStringToOrder( char *str ) if (mStatus == LLBVHLoader::ST_NO_XLT_FILE) { - llwarns << "NOTE: No translation table found." << llendl; + LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; return; } else { if (mStatus != LLBVHLoader::ST_OK) { - llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; return; } } @@ -147,7 +147,7 @@ LLQuaternion::Order bvhStringToOrder( char *str ) mStatus = loadBVHFile(buffer, error_text, error_line); if (mStatus != LLBVHLoader::ST_OK) { - llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; return; } @@ -163,10 +163,10 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error errorLine = 0; mStatus = loadTranslationTable("anim.ini"); loadStatus = mStatus; - llinfos<<"Load Status 00 : "<< loadStatus << llendl; + LL_INFOS()<<"Load Status 00 : "<< loadStatus << LL_ENDL; if (mStatus == E_ST_NO_XLT_FILE) { - //llwarns << "NOTE: No translation table found." << llendl; + //LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; loadStatus = mStatus; return; } @@ -174,7 +174,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error { if (mStatus != E_ST_OK) { - //llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + //LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; errorLine = getLineNumber(); loadStatus = mStatus; return; @@ -187,7 +187,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error if (mStatus != E_ST_OK) { - //llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + //LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; loadStatus = mStatus; errorLine = getLineNumber(); return; @@ -225,7 +225,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) if (!fp) return E_ST_NO_XLT_FILE; - llinfos << "NOTE: Loading translation table: " << fileName << llendl; + LL_INFOS() << "NOTE: Loading translation table: " << fileName << LL_ENDL; //-------------------------------------------------------------------- // register file to be closed on function exit @@ -289,7 +289,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) return E_ST_NO_XLT_EMOTE; mEmoteName.assign( emote_str ); -// llinfos << "NOTE: Emote: " << mEmoteName.c_str() << llendl; +// LL_INFOS() << "NOTE: Emote: " << mEmoteName.c_str() << LL_ENDL; continue; } @@ -304,7 +304,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) return E_ST_NO_XLT_PRIORITY; mPriority = priority; -// llinfos << "NOTE: Priority: " << mPriority << llendl; +// LL_INFOS() << "NOTE: Priority: " << mPriority << LL_ENDL; continue; } @@ -697,7 +697,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & if ( !strstr(line.c_str(), "HIERARCHY") ) { -// llinfos << line << llendl; +// LL_INFOS() << line << LL_ENDL; return E_ST_NO_HIER; } @@ -1044,7 +1044,7 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( trans.mIgnore ) { - //llinfos << "NOTE: Ignoring " << joint->mName.c_str() << llendl; + //LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL; joint->mIgnore = TRUE; continue; } @@ -1054,7 +1054,7 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mOutName.empty() ) { - //llinfos << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << llendl; + //LL_INFOS() << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << LL_ENDL; joint->mOutName = trans.mOutName; } @@ -1071,25 +1071,25 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( trans.mRelativePositionKey ) { -// llinfos << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << llendl; +// LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL; joint->mRelativePositionKey = TRUE; } if ( trans.mRelativeRotationKey ) { -// llinfos << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << llendl; +// LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL; joint->mRelativeRotationKey = TRUE; } if ( trans.mRelativePosition.magVec() > 0.0f ) { joint->mRelativePosition = trans.mRelativePosition; -// llinfos << "NOTE: Removing " << +// LL_INFOS() << "NOTE: Removing " << // joint->mRelativePosition.mV[0] << " " << // joint->mRelativePosition.mV[1] << " " << // joint->mRelativePosition.mV[2] << // " from all position keys in " << -// joint->mOutName.c_str() << llendl; +// joint->mOutName.c_str() << LL_ENDL; } //---------------------------------------------------------------- @@ -1103,9 +1103,9 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mMergeParentName.empty() ) { -// llinfos << "NOTE: Merging " << joint->mOutName.c_str() << +// LL_INFOS() << "NOTE: Merging " << joint->mOutName.c_str() << // " with parent " << -// trans.mMergeParentName.c_str() << llendl; +// trans.mMergeParentName.c_str() << LL_ENDL; joint->mMergeParentName = trans.mMergeParentName; } @@ -1114,8 +1114,8 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mMergeChildName.empty() ) { -// llinfos << "NOTE: Merging " << joint->mName.c_str() << -// " with child " << trans.mMergeChildName.c_str() << llendl; +// LL_INFOS() << "NOTE: Merging " << joint->mName.c_str() << +// " with child " << trans.mMergeChildName.c_str() << LL_ENDL; joint->mMergeChildName = trans.mMergeChildName; } @@ -1310,7 +1310,7 @@ void LLBVHLoader::optimize() // don't output joints with no motion if (!(pos_changed || rot_changed)) { - //llinfos << "Ignoring joint " << joint->mName << llendl; + //LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL; joint->mIgnore = TRUE; } } diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 045b4abf50..0eed3356e4 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -106,7 +106,7 @@ LLJoint *LLCharacter::getJoint( const std::string &name ) if (!joint) { - llwarns << "Failed to find joint." << llendl; + LL_WARNS() << "Failed to find joint." << LL_ENDL; } return joint; } @@ -181,7 +181,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id) //----------------------------------------------------------------------------- void LLCharacter::requestStopMotion( LLMotion* motion) { -// llinfos << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << llendl; +// LL_INFOS() << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << LL_ENDL; } @@ -242,14 +242,14 @@ void LLCharacter::dumpCharacter( LLJoint* joint ) // handle top level entry into recursion if (joint == NULL) { - llinfos << "DEBUG: Dumping Character @" << this << llendl; + LL_INFOS() << "DEBUG: Dumping Character @" << this << LL_ENDL; dumpCharacter( getRootJoint() ); - llinfos << "DEBUG: Done." << llendl; + LL_INFOS() << "DEBUG: Done." << LL_ENDL; return; } // print joint info - llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl; + LL_INFOS() << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << LL_ENDL; // recurse for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin(); @@ -313,7 +313,7 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL name_iter->second->setWeight(weight, upload_bake); return TRUE; } - llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; return FALSE; } @@ -328,7 +328,7 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake) index_iter->second->setWeight(weight, upload_bake); return TRUE; } - llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << llendl; + LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL; return FALSE; } @@ -345,7 +345,7 @@ F32 LLCharacter::getVisualParamWeight(LLVisualParam *which_param) } else { - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << LL_ENDL; return 0.f; } } @@ -363,7 +363,7 @@ F32 LLCharacter::getVisualParamWeight(const char* param_name) { return name_iter->second->getWeight(); } - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; return 0.f; } @@ -379,7 +379,7 @@ F32 LLCharacter::getVisualParamWeight(S32 index) } else { - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL; return 0.f; } } @@ -413,7 +413,7 @@ LLVisualParam* LLCharacter::getVisualParam(const char *param_name) { return name_iter->second; } - llwarns << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << LL_ENDL; return NULL; } @@ -438,8 +438,8 @@ void LLCharacter::addSharedVisualParam(LLVisualParam *param) } else { - llwarns << "Shared visual parameter " << param->getName() << " does not already exist with ID " << - param->getID() << llendl; + LL_WARNS() << "Shared visual parameter " << param->getName() << " does not already exist with ID " << + param->getID() << LL_ENDL; } } @@ -454,8 +454,8 @@ void LLCharacter::addVisualParam(LLVisualParam *param) idxres = mVisualParamIndexMap.insert(visual_param_index_map_t::value_type(index, param)); if (!idxres.second) { - llwarns << "Visual parameter " << param->getName() << " already exists with same ID as " << - param->getName() << llendl; + LL_WARNS() << "Visual parameter " << param->getName() << " already exists with same ID as " << + param->getName() << LL_ENDL; visual_param_index_map_t::iterator index_iter = idxres.first; index_iter->second = param; } @@ -475,7 +475,7 @@ void LLCharacter::addVisualParam(LLVisualParam *param) name_iter->second = param; } } - //llinfos << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << llendl; + //LL_INFOS() << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << LL_ENDL; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index ff7ad1c289..86ed5e9e0d 100755 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -89,7 +89,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte !mCharacter->getJoint("mElbowLeft") || !mCharacter->getJoint("mWristLeft")) { - llwarns << "Invalid skeleton for editing motion!" << llendl; + LL_WARNS() << "Invalid skeleton for editing motion!" << LL_ENDL; return STATUS_FAILURE; } @@ -102,7 +102,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte if ( ! mParentState->getJoint() ) { - llinfos << getName() << ": Can't get parent joint." << llendl; + LL_INFOS() << getName() << ": Can't get parent joint." << LL_ENDL; return STATUS_FAILURE; } @@ -215,14 +215,14 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) if (!target.isFinite()) { // Don't error out here, set a fail-safe target vector - llwarns << "Non finite target in editing motion with target distance of " << target_dist << - " and focus point " << focus_pt << llendl; + LL_WARNS() << "Non finite target in editing motion with target distance of " << target_dist << + " and focus point " << focus_pt << LL_ENDL; target.setVec(1.f, 1.f, 1.f); } mTarget.setPosition( target + mParentJoint.getPosition()); -// llinfos << "Point At: " << mTarget.getPosition() << llendl; +// LL_INFOS() << "Point At: " << mTarget.getPosition() << LL_ENDL; // update the ikSolver if (!mTarget.getPosition().isExactlyZero()) diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index aeb65eb10f..1549c41e62 100755 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -93,14 +93,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs) BOOL LLGesture::trigger(KEY key, MASK mask) { - llwarns << "Parent class trigger called: you probably didn't mean this." << llendl; + LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return FALSE; } BOOL LLGesture::trigger(const std::string& trigger_string) { - llwarns << "Parent class trigger called: you probably didn't mean this." << llendl; + LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return FALSE; } @@ -130,7 +130,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size) if (tmp + sizeof(mKey) + sizeof(mMask) + 16 > buffer + max_size) { - llwarns << "Attempt to read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Attempt to read past end of buffer, bad data!!!!" << LL_ENDL; return buffer; } @@ -155,7 +155,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size) if (tmp > buffer + max_size) { - llwarns << "Read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Read past end of buffer, bad data!!!!" << LL_ENDL; return tmp; } @@ -273,7 +273,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) } else { - llwarns << "NULL gesture in gesture list (" << i << ")" << llendl; + LL_WARNS() << "NULL gesture in gesture list (" << i << ")" << LL_ENDL; } } return FALSE; @@ -306,7 +306,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) if (tmp + sizeof(count) > buffer + max_size) { - llwarns << "Invalid max_size" << llendl; + LL_WARNS() << "Invalid max_size" << LL_ENDL; return buffer; } @@ -314,7 +314,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) if (count > MAX_GESTURES) { - llwarns << "Unreasonably large gesture list count in deserialize: " << count << llendl; + LL_WARNS() << "Unreasonably large gesture list count in deserialize: " << count << LL_ENDL; return tmp; } @@ -327,7 +327,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) mList[i] = create_gesture(&tmp, max_size - (S32)(tmp - buffer)); if (tmp - buffer > max_size) { - llwarns << "Deserialization read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Deserialization read past end of buffer, bad data!!!!" << LL_ENDL; return tmp; } } diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index 696dba0d95..b3bf5a9a91 100755 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp @@ -192,7 +192,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) } else { - llwarns << "Requested hand pose out of range. Ignoring requested pose." << llendl; + LL_WARNS() << "Requested hand pose out of range. Ignoring requested pose." << LL_ENDL; } } @@ -200,7 +200,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) mCharacter->removeAnimationData("Hand Pose Priority"); // if (requestedHandPose) -// llinfos << "Hand Pose " << *requestedHandPose << llendl; +// LL_INFOS() << "Hand Pose " << *requestedHandPose << LL_ENDL; // if we are still blending... if (mCurrentPose != mNewPose) diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 4a8af2f00c..83c0b0aff4 100755 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -104,49 +104,49 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte mPelvisJoint = character->getJoint("mPelvis"); if ( ! mPelvisJoint ) { - llinfos << getName() << ": Can't get pelvis joint." << llendl; + LL_INFOS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } mRootJoint = character->getJoint("mRoot"); if ( ! mRootJoint ) { - llinfos << getName() << ": Can't get root joint." << llendl; + LL_INFOS() << getName() << ": Can't get root joint." << LL_ENDL; return STATUS_FAILURE; } mTorsoJoint = character->getJoint("mTorso"); if ( ! mTorsoJoint ) { - llinfos << getName() << ": Can't get torso joint." << llendl; + LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL; return STATUS_FAILURE; } mHeadJoint = character->getJoint("mHead"); if ( ! mHeadJoint ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } mTorsoState->setJoint( character->getJoint("mTorso") ); if ( ! mTorsoState->getJoint() ) { - llinfos << getName() << ": Can't get torso joint." << llendl; + LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL; return STATUS_FAILURE; } mNeckState->setJoint( character->getJoint("mNeck") ); if ( ! mNeckState->getJoint() ) { - llinfos << getName() << ": Can't get neck joint." << llendl; + LL_INFOS() << getName() << ": Can't get neck joint." << LL_ENDL; return STATUS_FAILURE; } mHeadState->setJoint( character->getJoint("mHead") ); if ( ! mHeadState->getJoint() ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } @@ -191,7 +191,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) { LLVector3 headLookAt = *targetPos; -// llinfos << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << llendl; +// LL_INFOS() << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << LL_ENDL; F32 lookatDistance = headLookAt.normVec(); @@ -310,21 +310,21 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character) mHeadJoint = character->getJoint("mHead"); if ( ! mHeadJoint ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } mLeftEyeState->setJoint( character->getJoint("mEyeLeft") ); if ( ! mLeftEyeState->getJoint() ) { - llinfos << getName() << ": Can't get left eyeball joint." << llendl; + LL_INFOS() << getName() << ": Can't get left eyeball joint." << LL_ENDL; return STATUS_FAILURE; } mRightEyeState->setJoint( character->getJoint("mEyeRight") ); if ( ! mRightEyeState->getJoint() ) { - llinfos << getName() << ": Can't get Right eyeball joint." << llendl; + LL_INFOS() << getName() << ": Can't get Right eyeball joint." << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 83bd62e8fa..1492cc172c 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -438,7 +438,7 @@ const LLMatrix4 &LLJoint::getWorldMatrix() //-------------------------------------------------------------------- void LLJoint::setWorldMatrix( const LLMatrix4& mat ) { -llinfos << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << llendl; +LL_INFOS() << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << LL_ENDL; // extract global translation LLVector3 trans( mat.mMatrix[VW][VX], mat.mMatrix[VW][VY], diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 1352c9d592..aa1ef68910 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -92,30 +92,30 @@ U32 LLKeyframeMotion::JointMotionList::dumpDiagInfo() { LLKeyframeMotion::JointMotion* joint_motion_p = mJointMotionArray[i]; - llinfos << "\tJoint " << joint_motion_p->mJointName << llendl; + LL_INFOS() << "\tJoint " << joint_motion_p->mJointName << LL_ENDL; if (joint_motion_p->mUsage & LLJointState::SCALE) { - llinfos << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at " - << joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at " + << joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey); } if (joint_motion_p->mUsage & LLJointState::ROT) { - llinfos << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at " - << joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at " + << joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey); } if (joint_motion_p->mUsage & LLJointState::POS) { - llinfos << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at " - << joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at " + << joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey); } } - llinfos << "Size: " << total_size << " bytes" << llendl; + LL_INFOS() << "Size: " << total_size << " bytes" << LL_ENDL; return total_size; } @@ -557,7 +557,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact if (!sVFS) { - llerrs << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << llendl; + LL_ERRS() << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << LL_ENDL; } BOOL success = FALSE; @@ -583,18 +583,18 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact if (!success) { - llwarns << "Can't open animation file " << mID << llendl; + LL_WARNS() << "Can't open animation file " << mID << LL_ENDL; mAssetStatus = ASSET_FETCH_FAILED; return STATUS_FAILURE; } - lldebugs << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << llendl; + LL_DEBUGS() << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << LL_ENDL; LLDataPackerBinaryBuffer dp(anim_data, anim_file_size); if (!deserialize(dp)) { - llwarns << "Failed to decode asset for animation " << getName() << ":" << getID() << llendl; + LL_WARNS() << "Failed to decode asset for animation " << getName() << ":" << getID() << LL_ENDL; mAssetStatus = ASSET_FETCH_FAILED; return STATUS_FAILURE; } @@ -980,7 +980,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 { case CONSTRAINT_TARGET_TYPE_GROUND: target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos); -// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; case CONSTRAINT_TARGET_TYPE_BODY: target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset); @@ -1082,7 +1082,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // convert intermediate joint positions to world coordinates positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition(); F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f); -// llinfos << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; positions[joint_num] = lerp(positions[joint_num], kinematic_position, LLSmoothInterpolation::getInterpolant(time_constant, FALSE)); } @@ -1113,8 +1113,8 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 if ((iteration_count >= MIN_ITERATION_COUNT) && (num_joints_finished == shared_data->mChainLength - 1)) { -// llinfos << iteration_count << " iterations on " << -// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << iteration_count << " iterations on " << +// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; } } @@ -1230,13 +1230,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU16(version, "version")) { - llwarns << "can't read version number" << llendl; + LL_WARNS() << "can't read version number" << LL_ENDL; return FALSE; } if (!dp.unpackU16(sub_version, "sub_version")) { - llwarns << "can't read sub version number" << llendl; + LL_WARNS() << "can't read sub version number" << LL_ENDL; return FALSE; } @@ -1247,16 +1247,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION) { #if LL_RELEASE - llwarns << "Bad animation version " << version << "." << sub_version << llendl; + LL_WARNS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; return FALSE; #else - llerrs << "Bad animation version " << version << "." << sub_version << llendl; + LL_ERRS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; #endif } if (!dp.unpackS32(temp_priority, "base_priority")) { - llwarns << "can't read animation base_priority" << llendl; + LL_WARNS() << "can't read animation base_priority" << LL_ENDL; return FALSE; } mJointMotionList->mBasePriority = (LLJoint::JointPriority) temp_priority; @@ -1268,7 +1268,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY) { - llwarns << "bad animation base_priority " << mJointMotionList->mBasePriority << llendl; + LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority << LL_ENDL; return FALSE; } @@ -1277,14 +1277,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackF32(mJointMotionList->mDuration, "duration")) { - llwarns << "can't read duration" << llendl; + LL_WARNS() << "can't read duration" << LL_ENDL; return FALSE; } if (mJointMotionList->mDuration > MAX_ANIM_DURATION || !llfinite(mJointMotionList->mDuration)) { - llwarns << "invalid animation duration" << llendl; + LL_WARNS() << "invalid animation duration" << LL_ENDL; return FALSE; } @@ -1293,13 +1293,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name")) { - llwarns << "can't read optional_emote_animation" << llendl; + LL_WARNS() << "can't read optional_emote_animation" << LL_ENDL; return FALSE; } if(mJointMotionList->mEmoteName==mID.asString()) { - llwarns << "Malformed animation mEmoteName==mID" << llendl; + LL_WARNS() << "Malformed animation mEmoteName==mID" << LL_ENDL; return FALSE; } @@ -1309,20 +1309,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mLoopInPoint, "loop_in_point") || !llfinite(mJointMotionList->mLoopInPoint)) { - llwarns << "can't read loop point" << llendl; + LL_WARNS() << "can't read loop point" << LL_ENDL; return FALSE; } if (!dp.unpackF32(mJointMotionList->mLoopOutPoint, "loop_out_point") || !llfinite(mJointMotionList->mLoopOutPoint)) { - llwarns << "can't read loop point" << llendl; + LL_WARNS() << "can't read loop point" << LL_ENDL; return FALSE; } if (!dp.unpackS32(mJointMotionList->mLoop, "loop")) { - llwarns << "can't read loop" << llendl; + LL_WARNS() << "can't read loop" << LL_ENDL; return FALSE; } @@ -1332,14 +1332,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mEaseInDuration, "ease_in_duration") || !llfinite(mJointMotionList->mEaseInDuration)) { - llwarns << "can't read easeIn" << llendl; + LL_WARNS() << "can't read easeIn" << LL_ENDL; return FALSE; } if (!dp.unpackF32(mJointMotionList->mEaseOutDuration, "ease_out_duration") || !llfinite(mJointMotionList->mEaseOutDuration)) { - llwarns << "can't read easeOut" << llendl; + LL_WARNS() << "can't read easeOut" << LL_ENDL; return FALSE; } @@ -1349,13 +1349,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 word; if (!dp.unpackU32(word, "hand_pose")) { - llwarns << "can't read hand pose" << llendl; + LL_WARNS() << "can't read hand pose" << LL_ENDL; return FALSE; } if(word > LLHandMotion::NUM_HAND_POSES) { - llwarns << "invalid LLHandMotion::eHandPose index: " << word << llendl; + LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << LL_ENDL; return FALSE; } @@ -1367,18 +1367,18 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 num_motions = 0; if (!dp.unpackU32(num_motions, "num_joints")) { - llwarns << "can't read number of joints" << llendl; + LL_WARNS() << "can't read number of joints" << LL_ENDL; return FALSE; } if (num_motions == 0) { - llwarns << "no joints in animation" << llendl; + LL_WARNS() << "no joints in animation" << LL_ENDL; return FALSE; } else if (num_motions > LL_CHARACTER_MAX_JOINTS) { - llwarns << "too many joints in animation" << llendl; + LL_WARNS() << "too many joints in animation" << LL_ENDL; return FALSE; } @@ -1399,13 +1399,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) std::string joint_name; if (!dp.unpackString(joint_name, "joint_name")) { - llwarns << "can't read joint name" << llendl; + LL_WARNS() << "can't read joint name" << LL_ENDL; return FALSE; } if (joint_name == "mScreen" || joint_name == "mRoot") { - llwarns << "attempted to animate special " << joint_name << " joint" << llendl; + LL_WARNS() << "attempted to animate special " << joint_name << " joint" << LL_ENDL; return FALSE; } @@ -1415,11 +1415,11 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) LLJoint *joint = mCharacter->getJoint( joint_name ); if (joint) { -// llinfos << " joint: " << joint_name << llendl; +// LL_INFOS() << " joint: " << joint_name << LL_ENDL; } else { - llwarns << "joint not found: " << joint_name << llendl; + LL_WARNS() << "joint not found: " << joint_name << LL_ENDL; //return FALSE; } @@ -1436,13 +1436,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 joint_priority; if (!dp.unpackS32(joint_priority, "joint_priority")) { - llwarns << "can't read joint priority." << llendl; + LL_WARNS() << "can't read joint priority." << LL_ENDL; return FALSE; } if (joint_priority < LLJoint::USE_MOTION_PRIORITY) { - llwarns << "joint priority unknown - too low." << llendl; + LL_WARNS() << "joint priority unknown - too low." << LL_ENDL; return FALSE; } @@ -1460,7 +1460,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys") || joint_motion->mRotationCurve.mNumKeys < 0) { - llwarns << "can't read number of rotation keys" << llendl; + LL_WARNS() << "can't read number of rotation keys" << LL_ENDL; return FALSE; } @@ -1485,7 +1485,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(time, "time") || !llfinite(time)) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1494,7 +1494,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1502,7 +1502,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (time < 0 || time > mJointMotionList->mDuration) { - llwarns << "invalid frame time" << llendl; + LL_WARNS() << "invalid frame time" << LL_ENDL; return FALSE; } } @@ -1536,13 +1536,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(rot_key.mRotation.isFinite()) ) { - llwarns << "non-finite angle in rotation key" << llendl; + LL_WARNS() << "non-finite angle in rotation key" << LL_ENDL; success = FALSE; } if (!success) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1554,7 +1554,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys") || joint_motion->mPositionCurve.mNumKeys < 0) { - llwarns << "can't read number of position keys" << llendl; + LL_WARNS() << "can't read number of position keys" << LL_ENDL; return FALSE; } @@ -1579,7 +1579,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(pos_key.mTime, "time") || !llfinite(pos_key.mTime)) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } } @@ -1587,7 +1587,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1615,13 +1615,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(pos_key.mPosition.isFinite()) ) { - llwarns << "non-finite position in key" << llendl; + LL_WARNS() << "non-finite position in key" << LL_ENDL; success = FALSE; } if (!success) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1642,13 +1642,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 num_constraints = 0; if (!dp.unpackS32(num_constraints, "num_constraints")) { - llwarns << "can't read number of constraints" << llendl; + LL_WARNS() << "can't read number of constraints" << LL_ENDL; return FALSE; } if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0) { - llwarns << "Bad number of constraints... ignoring: " << num_constraints << llendl; + LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints << LL_ENDL; } else { @@ -1664,7 +1664,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU8(byte, "chain_length")) { - llwarns << "can't read constraint chain length" << llendl; + LL_WARNS() << "can't read constraint chain length" << LL_ENDL; delete constraintp; return FALSE; } @@ -1672,21 +1672,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions()) { - llwarns << "invalid constraint chain length" << llendl; + LL_WARNS() << "invalid constraint chain length" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackU8(byte, "constraint_type")) { - llwarns << "can't read constraint type" << llendl; + LL_WARNS() << "can't read constraint type" << LL_ENDL; delete constraintp; return FALSE; } if( byte >= NUM_CONSTRAINT_TYPES ) { - llwarns << "invalid constraint type" << llendl; + LL_WARNS() << "invalid constraint type" << LL_ENDL; delete constraintp; return FALSE; } @@ -1696,7 +1696,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U8 bin_data[BIN_DATA_LENGTH+1]; if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "source_volume")) { - llwarns << "can't read source volume name" << llendl; + LL_WARNS() << "can't read source volume name" << LL_ENDL; delete constraintp; return FALSE; } @@ -1707,21 +1707,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) { - llwarns << "can't read constraint source offset" << llendl; + LL_WARNS() << "can't read constraint source offset" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mSourceConstraintOffset.isFinite()) ) { - llwarns << "non-finite constraint source offset" << llendl; + LL_WARNS() << "non-finite constraint source offset" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) { - llwarns << "can't read target volume name" << llendl; + LL_WARNS() << "can't read target volume name" << LL_ENDL; delete constraintp; return FALSE; } @@ -1741,28 +1741,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset")) { - llwarns << "can't read constraint target offset" << llendl; + LL_WARNS() << "can't read constraint target offset" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mTargetConstraintOffset.isFinite()) ) { - llwarns << "non-finite constraint target offset" << llendl; + LL_WARNS() << "non-finite constraint target offset" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) { - llwarns << "can't read constraint target direction" << llendl; + LL_WARNS() << "can't read constraint target direction" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mTargetConstraintDir.isFinite()) ) { - llwarns << "non-finite constraint target direction" << llendl; + LL_WARNS() << "non-finite constraint target direction" << LL_ENDL; delete constraintp; return FALSE; } @@ -1775,28 +1775,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseInStartTime, "ease_in_start") || !llfinite(constraintp->mEaseInStartTime)) { - llwarns << "can't read constraint ease in start time" << llendl; + LL_WARNS() << "can't read constraint ease in start time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime)) { - llwarns << "can't read constraint ease in stop time" << llendl; + LL_WARNS() << "can't read constraint ease in stop time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime)) { - llwarns << "can't read constraint ease out start time" << llendl; + LL_WARNS() << "can't read constraint ease out start time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime)) { - llwarns << "can't read constraint ease out stop time" << llendl; + LL_WARNS() << "can't read constraint ease out stop time" << LL_ENDL; delete constraintp; return FALSE; } @@ -1816,8 +1816,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) LLJoint* parent = joint->getParent(); if (!parent) { - llwarns << "Joint with no parent: " << joint->getName() - << " Emote: " << mJointMotionList->mEmoteName << llendl; + LL_WARNS() << "Joint with no parent: " << joint->getName() + << " Emote: " << mJointMotionList->mEmoteName << LL_ENDL; return FALSE; } joint = parent; @@ -1828,7 +1828,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if ( !constraint_joint ) { - llwarns << "Invalid joint " << j << llendl; + LL_WARNS() << "Invalid joint " << j << LL_ENDL; return FALSE; } @@ -1840,7 +1840,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } if (constraintp->mJointStateIndices[i] < 0 ) { - llwarns << "No joint index for constraint " << i << llendl; + LL_WARNS() << "No joint index for constraint " << i << LL_ENDL; delete constraintp; return FALSE; } @@ -2161,7 +2161,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, U8* buffer = new U8[size]; file.read((U8*)buffer, size); /*Flawfinder: ignore*/ - lldebugs << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << llendl; + LL_DEBUGS() << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL; LLDataPackerBinaryBuffer dp(buffer, size); if (motionp->deserialize(dp)) @@ -2170,7 +2170,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl; + LL_WARNS() << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL; motionp->mAssetStatus = ASSET_FETCH_FAILED; } @@ -2178,13 +2178,13 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl; + LL_WARNS() << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL; motionp->mAssetStatus = ASSET_FETCH_FAILED; } } else { - llwarns << "No existing motion for asset data. UUID: " << asset_uuid << llendl; + LL_WARNS() << "No existing motion for asset data. UUID: " << asset_uuid << LL_ENDL; } } @@ -2198,9 +2198,9 @@ void LLKeyframeDataCache::dumpDiagInfo() char buf[1024]; /* Flawfinder: ignore */ - llinfos << "-----------------------------------------------------" << llendl; - llinfos << " Global Motion Table (DEBUG only)" << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; + LL_INFOS() << " Global Motion Table (DEBUG only)" << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage for (keyframe_data_map_t::iterator map_it = sKeyframeDataMap.begin(); @@ -2210,18 +2210,18 @@ void LLKeyframeDataCache::dumpDiagInfo() LLKeyframeMotion::JointMotionList *motion_list_p = map_it->second; - llinfos << "Motion: " << map_it->first << llendl; + LL_INFOS() << "Motion: " << map_it->first << LL_ENDL; joint_motion_kb = motion_list_p->dumpDiagInfo(); total_size += joint_motion_kb; } - llinfos << "-----------------------------------------------------" << llendl; - llinfos << "Motions\tTotal Size" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; + LL_INFOS() << "Motions\tTotal Size" << LL_ENDL; snprintf(buf, sizeof(buf), "%d\t\t%d bytes", (S32)sKeyframeDataMap.size(), total_size ); /* Flawfinder: ignore */ - llinfos << buf << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << buf << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; } diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index 82fe8971f5..6ed18bc445 100755 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -168,7 +168,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) { const ParameterizedMotion& paramMotion = *iter2; -// llinfos << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << llendl; +// LL_INFOS() << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << LL_ENDL; paramMotion.mMotion->getPose()->setWeight(0.f); } } @@ -181,7 +181,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) F32* paramValue = (F32 *)mCharacter->getAnimationData(paramName); if (NULL == paramValue) // unexpected, but... { - llwarns << "paramValue == NULL" << llendl; + LL_WARNS() << "paramValue == NULL" << LL_ENDL; continue; } @@ -256,8 +256,8 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) firstPose->setWeight(first_weight * weightFactor); secondPose->setWeight(second_weight * weightFactor); -// llinfos << "Parameter " << *paramName << ": " << *paramValue << llendl; -// llinfos << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << llendl; +// LL_INFOS() << "Parameter " << *paramName << ": " << *paramValue << LL_ENDL; +// LL_INFOS() << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << LL_ENDL; } } else if (firstMotion && !secondMotion) @@ -269,7 +269,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) // blend poses mPoseBlender.blendAndApply(); - llinfos << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << llendl; + LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL; return TRUE; } @@ -356,7 +356,7 @@ BOOL LLKeyframeMotionParam::loadMotions() apr_file_t* fp = infile.getFileHandle() ; if (!fp || fileSize == 0) { - llinfos << "ERROR: can't open: " << path << llendl; + LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL; return FALSE; } @@ -395,11 +395,11 @@ BOOL LLKeyframeMotionParam::loadMotions() if ( error ) { - llinfos << "ERROR: error while reading from " << path << llendl; + LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL; return FALSE; } - llinfos << "Loading parametric keyframe data for: " << getName() << llendl; + LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL; //------------------------------------------------------------------------- // parse the text and build keyframe data structures @@ -422,7 +422,7 @@ BOOL LLKeyframeMotionParam::loadMotions() if (num == 0 || num == EOF) break; if ((num != 3)) { - llinfos << "WARNING: can't read parametric motion" << llendl; + LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL; return FALSE; } diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp index 3f91532c8e..fdeddf55e1 100755 --- a/indra/llcharacter/llkeyframestandmotion.cpp +++ b/indra/llcharacter/llkeyframestandmotion.cpp @@ -119,7 +119,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch !mKneeRightState || !mAnkleRightState ) { - llinfos << getName() << ": Can't find necessary joint states" << llendl; + LL_INFOS() << getName() << ": Can't find necessary joint states" << LL_ENDL; return STATUS_FAILURE; } @@ -329,9 +329,9 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) mKneeRightState->setRotation( mKneeRightJoint.getRotation() ); mAnkleRightState->setRotation( mAnkleRightJoint.getRotation() ); - //llinfos << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << llendl; + //LL_INFOS() << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << LL_ENDL; -// llinfos << "DEBUG: " << speed << " : " << mTrackAnkles << llendl; +// LL_INFOS() << "DEBUG: " << speed << " : " << mTrackAnkles << LL_ENDL; return TRUE; } diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index b627110da6..8c9477f80d 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -163,7 +163,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara mPelvisState->setJoint( mPelvisJoint ); if ( !mPelvisJoint ) { - llwarns << getName() << ": Can't get pelvis joint." << llendl; + LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } @@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac mPelvisState->setJoint( pelvisJoint ); if ( !pelvisJoint ) { - llwarns << getName() << ": Can't get pelvis joint." << llendl; + LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index 6e532aac2f..5e37f094b8 100755 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -204,10 +204,10 @@ public: LLMotionBlendType getBlendType() { return NORMAL_BLEND; } F32 getMinPixelArea() { return 0.f; } - LLMotionInitStatus onInitialize(LLCharacter*) { llinfos << "LLTestMotion::onInitialize()" << llendl; return STATUS_SUCCESS; } - BOOL onActivate() { llinfos << "LLTestMotion::onActivate()" << llendl; return TRUE; } - BOOL onUpdate(F32 time, U8* joint_mask) { llinfos << "LLTestMotion::onUpdate(" << time << ")" << llendl; return TRUE; } - void onDeactivate() { llinfos << "LLTestMotion::onDeactivate()" << llendl; } + LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; } + BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return TRUE; } + BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return TRUE; } + void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; } }; diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index d1c605451a..b5065c348b 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -77,7 +77,7 @@ LLMotionRegistry::~LLMotionRegistry() //----------------------------------------------------------------------------- BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { - // llinfos << "Registering motion: " << name << llendl; + // LL_INFOS() << "Registering motion: " << name << LL_ENDL; if (!is_in_map(mMotionTable, id)) { mMotionTable[id] = constructor; @@ -232,7 +232,7 @@ void LLMotionController::purgeExcessMotions() if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES) { - LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << llendl; + LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL; } } @@ -360,7 +360,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) switch(stat) { case LLMotion::STATUS_FAILURE: - llinfos << "Motion " << id << " init failed." << llendl; + LL_INFOS() << "Motion " << id << " init failed." << LL_ENDL; sRegistry.markBad(id); delete motion; return NULL; @@ -372,7 +372,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) mLoadedMotions.insert(motion); break; default: - llerrs << "Invalid initialization status" << llendl; + LL_ERRS() << "Invalid initialization status" << LL_ENDL; break; } @@ -418,7 +418,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) return TRUE; } -// llinfos << "Starting motion " << name << llendl; +// LL_INFOS() << "Starting motion " << name << LL_ENDL; return activateMotionInstance(motion, mAnimTime - start_offset); } @@ -781,7 +781,7 @@ void LLMotionController::updateLoadingMotions() } else if (status == LLMotion::STATUS_FAILURE) { - llinfos << "Motion " << motionp->getID() << " init failed." << llendl; + LL_INFOS() << "Motion " << motionp->getID() << " init failed." << LL_ENDL; sRegistry.markBad(motionp->getID()); mLoadingMotions.erase(curiter); motion_set_t::iterator found_it = mDeprecatedMotions.find(motionp); @@ -883,7 +883,7 @@ void LLMotionController::updateMotions(bool force_update) } mHasRunOnce = TRUE; -// llinfos << "Motion controller time " << motionTimer.getElapsedTimeF32() << llendl; +// LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL; } //----------------------------------------------------------------------------- @@ -1039,7 +1039,7 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const //----------------------------------------------------------------------------- void LLMotionController::dumpMotions() { - llinfos << "=====================================" << llendl; + LL_INFOS() << "=====================================" << LL_ENDL; for (motion_map_t::iterator iter = mAllMotions.begin(); iter != mAllMotions.end(); iter++) { @@ -1054,7 +1054,7 @@ void LLMotionController::dumpMotions() state_string += std::string("A"); if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end()) state_string += std::string("D"); - llinfos << gAnimLibrary.animationName(id) << " " << state_string << llendl; + LL_INFOS() << gAnimLibrary.animationName(id) << " " << state_string << LL_ENDL; } } @@ -1113,7 +1113,7 @@ void LLMotionController::pauseAllMotions() { if (!mPaused) { - //llinfos << "Pausing animations..." << llendl; + //LL_INFOS() << "Pausing animations..." << LL_ENDL; mPaused = TRUE; } @@ -1126,7 +1126,7 @@ void LLMotionController::unpauseAllMotions() { if (mPaused) { - //llinfos << "Unpausing animations..." << llendl; + //LL_INFOS() << "Unpausing animations..." << LL_ENDL; mPaused = FALSE; } } diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index e2d284834f..4a06f3da28 100755 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp @@ -146,9 +146,9 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) dp.unpackS32(version, "version"); if (version != GESTURE_VERSION) { - llwarns << "Bad LLMultiGesture version " << version + LL_WARNS() << "Bad LLMultiGesture version " << version << " should be " << GESTURE_VERSION - << llendl; + << LL_ENDL; return FALSE; } @@ -164,7 +164,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) dp.unpackS32(count, "step_count"); if (count < 0) { - llwarns << "Bad LLMultiGesture step count " << count << llendl; + LL_WARNS() << "Bad LLMultiGesture step count " << count << LL_ENDL; return FALSE; } @@ -211,7 +211,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) } default: { - llwarns << "Bad LLMultiGesture step type " << type << llendl; + LL_WARNS() << "Bad LLMultiGesture step type " << type << LL_ENDL; return FALSE; } } @@ -221,10 +221,10 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) void LLMultiGesture::dump() { - llinfos << "key " << S32(mKey) << " mask " << U32(mMask) + LL_INFOS() << "key " << S32(mKey) << " mask " << U32(mMask) << " trigger " << mTrigger << " replace " << mReplaceText - << llendl; + << LL_ENDL; U32 i; for (i = 0; i < mSteps.size(); ++i) { @@ -312,10 +312,10 @@ std::vector LLGestureStepAnimation::getLabel() const void LLGestureStepAnimation::dump() { - llinfos << "step animation " << mAnimName + LL_INFOS() << "step animation " << mAnimName << " id " << mAnimAssetID << " flags " << mFlags - << llendl; + << LL_ENDL; } //--------------------------------------------------------------------------- @@ -374,10 +374,10 @@ std::vector LLGestureStepSound::getLabel() const void LLGestureStepSound::dump() { - llinfos << "step sound " << mSoundName + LL_INFOS() << "step sound " << mSoundName << " id " << mSoundAssetID << " flags " << mFlags - << llendl; + << LL_ENDL; } @@ -430,9 +430,9 @@ std::vector LLGestureStepChat::getLabel() const void LLGestureStepChat::dump() { - llinfos << "step chat " << mChatText + LL_INFOS() << "step chat " << mChatText << " flags " << mFlags - << llendl; + << LL_ENDL; } @@ -503,7 +503,7 @@ std::vector LLGestureStepWait::getLabel() const void LLGestureStepWait::dump() { - llinfos << "step wait " << mWaitSeconds + LL_INFOS() << "step wait " << mWaitSeconds << " flags " << mFlags - << llendl; + << LL_ENDL; } diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index e0454131a5..b917db3117 100755 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -88,7 +88,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat Transitions::iterator transition_it = state_transitions->find(&transition); if (transition_it != state_transitions->end()) { - llerrs << "LLStateTable::addDirectedTransition() : transition already exists" << llendl; + LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL; return FALSE; // transition already exists } @@ -210,7 +210,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) if (!dot_file) { - llwarns << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << llendl; + LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL; return FALSE; } apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); @@ -364,7 +364,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d if (NULL == mCurrentState) { - llwarns << "mCurrentState == NULL; aborting processTransition()" << llendl; + LL_WARNS() << "mCurrentState == NULL; aborting processTransition()" << LL_ENDL; return; } @@ -372,7 +372,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d if (NULL == new_state) { - llwarns << "new_state == NULL; aborting processTransition()" << llendl; + LL_WARNS() << "new_state == NULL; aborting processTransition()" << LL_ENDL; return; } @@ -385,9 +385,9 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d mCurrentState = new_state; mCurrentState->onEntry(user_data); #if FSM_PRINT_STATE_TRANSITIONS - llinfos << "Entering state " << mCurrentState->getName() << + LL_INFOS() << "Entering state " << mCurrentState->getName() << " on transition " << transition.getName() << " from state " << - mLastState->getName() << llendl; + mLastState->getName() << LL_ENDL; #endif } } diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index 633c1d51eb..37e61e936d 100755 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -80,7 +80,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac !mTorsoJoint || !mRightHandJoint) { - llwarns << "Invalid skeleton for targeting motion!" << llendl; + LL_WARNS() << "Invalid skeleton for targeting motion!" << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index f7cb0f76b7..0df7fb2bc3 100755 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -79,7 +79,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) mDefaultWeight = llclamp( default_weight, mMinWeight, mMaxWeight ); if( default_weight != mDefaultWeight ) { - llwarns << "value_default attribute is out of range in node " << mName << " " << default_weight << llendl; + LL_WARNS() << "value_default attribute is out of range in node " << mName << " " << default_weight << LL_ENDL; } } @@ -101,7 +101,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) } else { - llwarns << "Avatar file: has invalid sex attribute: " << sex << llendl; + LL_WARNS() << "Avatar file: has invalid sex attribute: " << sex << LL_ENDL; return FALSE; } @@ -109,7 +109,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mName ) ) { - llwarns << "Avatar file: is missing name attribute" << llendl; + LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; return FALSE; } @@ -346,7 +346,7 @@ void LLVisualParam::setParamLocation(EParamLocation loc) } else { - lldebugs << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl; + LL_DEBUGS() << "param location is already " << mParamLocation << ", not slamming to " << loc << LL_ENDL; } } -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 8c9477f80d..66e4b947c4 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnits::Milliseconds::fromValue(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnits::U32Milliseconds(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); -- cgit v1.2.3 From 9f7bfa1c3710856cd2b0a0a8a429d6c45b0fcd09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Aug 2013 00:02:23 -0700 Subject: moved unit types out of LLUnits namespace, since they are prefixed --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 66e4b947c4..65c1fcd99d 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnits::U32Milliseconds(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, U32Milliseconds(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/llcharacter/llcharacter.cpp | 12 ++++++------ indra/llcharacter/llmotioncontroller.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 0eed3356e4..9eb2f9399b 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -188,20 +188,20 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- // updateMotions() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation"); -static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); -static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions"); +static LLTrace::TimeBlock FTM_UPDATE_ANIMATION("Update Animation"); +static LLTrace::TimeBlock FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLTrace::TimeBlock FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { if (update_type == HIDDEN_UPDATE) { - LLFastTimer t(FTM_UPDATE_HIDDEN_ANIMATION); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_HIDDEN_ANIMATION); mMotionController.updateMotionsMinimal(); } else { - LLFastTimer t(FTM_UPDATE_ANIMATION); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_ANIMATION); // unpause if the number of outstanding pause requests has dropped to the initial one if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1) { @@ -209,7 +209,7 @@ void LLCharacter::updateMotions(e_update_t update_type) } bool force_update = (update_type == FORCE_UPDATE); { - LLFastTimer t(FTM_UPDATE_MOTIONS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOTIONS); mMotionController.updateMotions(force_update); } } diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index b5065c348b..24fa1c86e9 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -541,7 +541,7 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate"); +static LLTrace::TimeBlock FTM_MOTION_ON_UPDATE("Motion onUpdate"); void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { @@ -701,7 +701,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // perform motion update { - LLFastTimer t(FTM_MOTION_ON_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_MOTION_ON_UPDATE); update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); } } -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/llcharacter/llcharacter.cpp | 6 +++--- indra/llcharacter/llmotioncontroller.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 9eb2f9399b..82ddfa01ec 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -188,9 +188,9 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- // updateMotions() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_UPDATE_ANIMATION("Update Animation"); -static LLTrace::TimeBlock FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); -static LLTrace::TimeBlock FTM_UPDATE_MOTIONS("Update Motions"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_ANIMATION("Update Animation"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 24fa1c86e9..50ccfd75fb 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -541,7 +541,7 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_MOTION_ON_UPDATE("Motion onUpdate"); +static LLTrace::BlockTimerStatHandle FTM_MOTION_ON_UPDATE("Motion onUpdate"); void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { -- cgit v1.2.3 From 7956b9e3e83ed4a5d648e63ae7c06a90313a6b09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 9 Nov 2013 00:01:52 -0800 Subject: BUILDFIX: updated enum to match viewer-sunshine so I can get llappearance-utility building for viewer-interesting --- indra/llcharacter/llvisualparam.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 60ea7a369a..a4d9f93e56 100755 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -47,6 +47,7 @@ enum EVisualParamGroup VISUAL_PARAM_GROUP_TWEAKABLE, VISUAL_PARAM_GROUP_ANIMATABLE, VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT, + VISUAL_PARAM_GROUP_TRANSMIT_NOT_TWEAKABLE, // deprecated params that used to be tweakable. NUM_VISUAL_PARAM_GROUPS }; -- cgit v1.2.3 From d4f3fe3c5691348b72729ba57cef337c1dca0141 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 10 Dec 2013 12:50:23 -0800 Subject: SH-4653 FIX Interesting: Viewer crashes while reading chat history --- indra/llcharacter/llcharacter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 43fb68bb5c..b10a8a5f34 100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -37,7 +37,7 @@ #include "llvisualparam.h" #include "llstringtable.h" #include "llpointer.h" -#include "llthread.h" +#include "llrefcount.h" class LLPolyMesh; -- cgit v1.2.3