LLMotion Class Reference

#include <llmotion.h>

Inheritance diagram for LLMotion:

Inheritance graph
[legend]
Collaboration diagram for LLMotion:

Collaboration graph
[legend]
List of all members.

Public Types

 NORMAL_BLEND
 ADDITIVE_BLEND
 STATUS_FAILURE
 STATUS_SUCCESS
 STATUS_HOLD
enum  LLMotionBlendType { NORMAL_BLEND, ADDITIVE_BLEND }
enum  LLMotionInitStatus { STATUS_FAILURE, STATUS_SUCCESS, STATUS_HOLD }

Public Member Functions

 LLMotion (const LLUUID &id)
virtual ~LLMotion ()
const std::string & getName () const
void setName (const std::string &name)
const LLUUIDgetID () const
virtual LLPosegetPose ()
void fadeOut ()
void fadeIn ()
F32 getFadeWeight () const
F32 getStopTime () const
virtual void setStopTime (F32 time)
BOOL isStopped () const
void setStopped (BOOL stopped)
BOOL isBlending ()
void activate ()
void deactivate ()
BOOL isActive ()
virtual BOOL getLoop ()=0
virtual F32 getDuration ()=0
virtual F32 getEaseInDuration ()=0
virtual F32 getEaseOutDuration ()=0
virtual LLJoint::JointPriority getPriority ()=0
virtual LLMotionBlendType getBlendType ()=0
virtual F32 getMinPixelArea ()=0
virtual LLMotionInitStatus onInitialize (LLCharacter *character)=0
virtual BOOL onUpdate (F32 activeTime, U8 *joint_mask)=0
virtual void onDeactivate ()=0
virtual BOOL canDeprecate ()
void setDeactivateCallback (void(*cb)(void *), void *userdata)

Static Public Member Functions

static LLMotioncreate (const LLUUID &id)

Public Attributes

std::string mName
LLUUID mID
F32 mActivationTimestamp
F32 mStopTimestamp
F32 mSendStopTimestamp
F32 mResidualWeight
F32 mFadeWeight
U8 mJointSignature [3][LL_CHARACTER_MAX_JOINTS]
void(* mDeactivateCallback )(void *data)
voidmDeactivateCallbackUserData

Protected Member Functions

virtual BOOL onActivate ()=0
void addJointState (LLJointState *jointState)

Protected Attributes

LLPose mPose
BOOL mStopped
BOOL mActive

Detailed Description

Definition at line 49 of file llmotion.h.


Member Enumeration Documentation

enum LLMotion::LLMotionBlendType

Enumerator:
NORMAL_BLEND 
ADDITIVE_BLEND 

Definition at line 52 of file llmotion.h.

enum LLMotion::LLMotionInitStatus

Enumerator:
STATUS_FAILURE 
STATUS_SUCCESS 
STATUS_HOLD 

Definition at line 58 of file llmotion.h.


Constructor & Destructor Documentation

LLMotion::LLMotion ( const LLUUID id  ) 

Definition at line 50 of file llmotion.cpp.

References F32_MAX, FALSE, LL_CHARACTER_MAX_JOINTS, mActivationTimestamp, mActive, mDeactivateCallback, mFadeWeight, mID, mJointSignature, mResidualWeight, mSendStopTimestamp, mStopped, mStopTimestamp, NULL, and TRUE.

LLMotion::~LLMotion (  )  [virtual]

Definition at line 72 of file llmotion.cpp.


Member Function Documentation

void LLMotion::activate (  ) 

Definition at line 140 of file llmotion.cpp.

References FALSE, mActive, mStopped, onActivate(), and TRUE.

Referenced by LLMotionController::activateMotionInstance().

void LLMotion::addJointState ( LLJointState jointState  )  [protected]

Definition at line 109 of file llmotion.cpp.

References LLPose::addJointState(), LLJointState::getJoint(), LLJoint::getJointNum(), getPriority(), LLJointState::getPriority(), LLJointState::getUsage(), mJointSignature, mPose, LLJointState::POS, LLJointState::ROT, S32, LLJointState::SCALE, and LLJoint::USE_MOTION_PRIORITY.

Referenced by LLPelvisFixMotion::onInitialize(), LLBreatheMotionRot::onInitialize(), LLBodyNoiseMotion::onInitialize(), LLTargetingMotion::onInitialize(), LLFlyAdjustMotion::onInitialize(), LLWalkAdjustMotion::onInitialize(), LLEyeMotion::onInitialize(), LLHeadRotMotion::onInitialize(), LLEditingMotion::onInitialize(), and LLKeyframeMotion::setupPose().

BOOL LLMotion::canDeprecate (  )  [virtual]

Reimplemented in LLEmote.

Definition at line 160 of file llmotion.cpp.

References TRUE.

Referenced by LLMotionController::startMotion().

static LLMotion* LLMotion::create ( const LLUUID id  )  [inline, static]

Reimplemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeFallMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLKeyframeStandMotion, LLKeyframeWalkMotion, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Definition at line 78 of file llmotion.h.

References NULL.

void LLMotion::deactivate (  ) 

Definition at line 150 of file llmotion.cpp.

References f, FALSE, mActive, mDeactivateCallback, mDeactivateCallbackUserData, mPose, onDeactivate(), and LLPose::setWeight().

Referenced by LLMotionController::deactivateMotionInstance(), and LLMotionController::flushAllMotions().

void LLMotion::fadeIn (  ) 

Definition at line 94 of file llmotion.cpp.

References f, LLCriticalDamp::getInterpolant(), lerp(), and mFadeWeight.

Referenced by LLMotionController::updateMotionsByType().

void LLMotion::fadeOut (  ) 

Definition at line 79 of file llmotion.cpp.

References f, LLCriticalDamp::getInterpolant(), lerp(), and mFadeWeight.

Referenced by LLMotionController::updateMotionsByType().

virtual LLMotionBlendType LLMotion::getBlendType (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLPoseBlender::addMotion(), and LLMotionController::updateMotionsByType().

virtual F32 LLMotion::getDuration (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::activateMotionInstance(), LLAgent::changeCameraToCustomizeAvatar(), and LLFloaterAnimPreview::onSliderMove().

virtual F32 LLMotion::getEaseInDuration (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeFallMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::updateMotionsByType().

virtual F32 LLMotion::getEaseOutDuration (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::activateMotionInstance(), and LLMotionController::updateMotionsByType().

F32 LLMotion::getFadeWeight (  )  const [inline]

Definition at line 95 of file llmotion.h.

References mFadeWeight.

Referenced by LLMotionController::startMotion(), and LLMotionController::updateMotionsByType().

const LLUUID& LLMotion::getID (  )  const [inline]

Definition at line 86 of file llmotion.h.

References mID.

Referenced by LLMotionController::deprecateMotionInstance(), LLKeyframeMotion::deserialize(), LLMotionController::flushAllMotions(), LLFloaterAnimPreview::onBtnOK(), LLKeyframeMotion::onInitialize(), LLKeyframeMotion::onLoadComplete(), LLAgent::requestStopMotion(), and LLMotionController::updateMotion().

virtual BOOL LLMotion::getLoop (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::activateMotionInstance().

virtual F32 LLMotion::getMinPixelArea (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::updateMotionsByType().

const std::string& LLMotion::getName (  )  const [inline]

Definition at line 81 of file llmotion.h.

References mName.

Referenced by LLKeyframeMotionParam::loadMotions(), LLFlyAdjustMotion::onInitialize(), LLWalkAdjustMotion::onInitialize(), LLKeyframeStandMotion::onInitialize(), LLKeyframeMotion::onInitialize(), LLKeyframeFallMotion::onInitialize(), LLEyeMotion::onInitialize(), LLHeadRotMotion::onInitialize(), LLEditingMotion::onInitialize(), and LLKeyframeMotion::onLoadComplete().

virtual LLPose* LLMotion::getPose (  )  [inline, virtual]

Reimplemented in LLKeyframeMotionParam.

Definition at line 89 of file llmotion.h.

References mPose.

Referenced by LLMotionController::activateMotionInstance(), LLPoseBlender::addMotion(), LLKeyframeStandMotion::onInitialize(), and LLMotionController::updateMotionsByType().

virtual LLJoint::JointPriority LLMotion::getPriority (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by addJointState(), and LLPoseBlender::addMotion().

F32 LLMotion::getStopTime (  )  const [inline]

Definition at line 97 of file llmotion.h.

References mStopTimestamp.

Referenced by LLMotionController::startMotion(), and LLMotionController::updateMotionsByType().

BOOL LLMotion::isActive (  )  [inline]

Definition at line 111 of file llmotion.h.

References mActive.

Referenced by LLMotionController::isMotionActive().

BOOL LLMotion::isBlending (  ) 

Definition at line 132 of file llmotion.cpp.

References LLPose::getWeight(), and mPose.

Referenced by LLMotionController::startMotion().

BOOL LLMotion::isStopped (  )  const [inline]

Definition at line 101 of file llmotion.h.

References mStopped.

Referenced by LLMotionController::stopMotionInstance(), LLHUDEffectLookAt::update(), LLMotionController::updateMotion(), and LLMotionController::updateMotionsByType().

virtual BOOL LLMotion::onActivate (  )  [protected, pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeFallMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLKeyframeStandMotion, LLKeyframeWalkMotion, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by activate().

virtual void LLMotion::onDeactivate (  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLKeyframeStandMotion, LLKeyframeWalkMotion, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by deactivate().

virtual LLMotionInitStatus LLMotion::onInitialize ( LLCharacter character  )  [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeFallMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLKeyframeStandMotion, LLKeyframeWalkMotion, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::createMotion(), and LLMotionController::updateMotion().

virtual BOOL LLMotion::onUpdate ( F32  activeTime,
U8 joint_mask 
) [pure virtual]

Implemented in LLEditingMotion, LLHandMotion, LLHeadRotMotion, LLEyeMotion, LLKeyframeFallMotion, LLKeyframeMotion, LLKeyframeMotionParam, LLKeyframeStandMotion, LLKeyframeWalkMotion, LLWalkAdjustMotion, LLFlyAdjustMotion, LLTestMotion, LLNullMotion, LLTargetingMotion, LLEmote, LLBodyNoiseMotion, LLBreatheMotionRot, and LLPelvisFixMotion.

Referenced by LLMotionController::activateMotionInstance(), and LLMotionController::updateMotionsByType().

void LLMotion::setDeactivateCallback ( void(*)(void *)  cb,
void userdata 
)

Definition at line 126 of file llmotion.cpp.

References mDeactivateCallback, and mDeactivateCallbackUserData.

Referenced by LLPreviewAnim::auditionAnim(), LLPreviewAnim::onClose(), and LLPreviewAnim::playAnim().

void LLMotion::setName ( const std::string &  name  )  [inline]

Definition at line 84 of file llmotion.h.

References mName.

Referenced by LLKeyframeMotionParam::addKeyframeMotion(), LLMotionController::createMotion(), LLFloaterAnimPreview::onCommitName(), and LLFloaterAnimPreview::postBuild().

void LLMotion::setStopped ( BOOL  stopped  )  [inline]

Definition at line 103 of file llmotion.h.

References mStopped.

Referenced by LLMotionController::activateMotionInstance(), and LLMotionController::stopMotionInstance().

virtual void LLMotion::setStopTime ( F32  time  )  [inline, virtual]

Reimplemented in LLKeyframeMotion.

Definition at line 99 of file llmotion.h.

References mStopped, mStopTimestamp, and TRUE.

Referenced by LLKeyframeMotion::setStopTime(), and LLMotionController::stopMotionInstance().


Member Data Documentation

F32 LLMotion::mActivationTimestamp

Definition at line 181 of file llmotion.h.

Referenced by LLMotionController::activateMotionInstance(), LLMotionController::flushAllMotions(), LLMotion(), LLFloaterAnimPreview::onSliderMove(), LLKeyframeMotion::setStopTime(), and LLMotionController::updateMotionsByType().

BOOL LLMotion::mActive [protected]

Definition at line 171 of file llmotion.h.

Referenced by activate(), deactivate(), isActive(), and LLMotion().

void(* LLMotion::mDeactivateCallback)(void *data)

Referenced by deactivate(), LLMotion(), and setDeactivateCallback().

void* LLMotion::mDeactivateCallbackUserData

Definition at line 188 of file llmotion.h.

Referenced by deactivate(), and setDeactivateCallback().

F32 LLMotion::mFadeWeight

Definition at line 185 of file llmotion.h.

Referenced by fadeIn(), fadeOut(), getFadeWeight(), and LLMotion().

LLUUID LLMotion::mID

Definition at line 179 of file llmotion.h.

Referenced by getID(), LLMotion(), and LLKeyframeMotion::onInitialize().

U8 LLMotion::mJointSignature[3][LL_CHARACTER_MAX_JOINTS]

Definition at line 186 of file llmotion.h.

Referenced by addJointState(), LLEmote::LLEmote(), LLHandMotion::LLHandMotion(), LLMotion(), and LLMotionController::updateMotionsByType().

std::string LLMotion::mName

Definition at line 178 of file llmotion.h.

Referenced by getName(), LLBodyNoiseMotion::LLBodyNoiseMotion(), LLBreatheMotionRot::LLBreatheMotionRot(), LLEditingMotion::LLEditingMotion(), LLEyeMotion::LLEyeMotion(), LLFlyAdjustMotion::LLFlyAdjustMotion(), LLHandMotion::LLHandMotion(), LLHeadRotMotion::LLHeadRotMotion(), LLPelvisFixMotion::LLPelvisFixMotion(), LLTargetingMotion::LLTargetingMotion(), LLWalkAdjustMotion::LLWalkAdjustMotion(), LLEmote::onActivate(), and setName().

LLPose LLMotion::mPose [protected]

Definition at line 169 of file llmotion.h.

Referenced by addJointState(), deactivate(), getPose(), isBlending(), LLKeyframeStandMotion::onUpdate(), and LLEmote::onUpdate().

F32 LLMotion::mResidualWeight

Definition at line 184 of file llmotion.h.

Referenced by LLMotionController::activateMotionInstance(), LLMotion(), and LLMotionController::updateMotionsByType().

F32 LLMotion::mSendStopTimestamp

Definition at line 183 of file llmotion.h.

Referenced by LLMotionController::activateMotionInstance(), LLMotion(), LLFloaterAnimPreview::onSliderMove(), LLKeyframeMotion::setLoop(), and LLMotionController::updateMotionsByType().

BOOL LLMotion::mStopped [protected]

Definition at line 170 of file llmotion.h.

Referenced by activate(), isStopped(), LLMotion(), LLKeyframeMotion::onUpdate(), setStopped(), and setStopTime().

F32 LLMotion::mStopTimestamp

Definition at line 182 of file llmotion.h.

Referenced by getStopTime(), LLMotion(), LLFloaterAnimPreview::onSliderMove(), setStopTime(), and LLKeyframeMotion::setStopTime().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:31 2010 for Second Life Viewer by  doxygen 1.4.7