LLKeyframeMotion Class Reference

#include <llkeyframemotion.h>

Inheritance diagram for LLKeyframeMotion:

Inheritance graph
[legend]
Collaboration diagram for LLKeyframeMotion:

Collaboration graph
[legend]
List of all members.

Public Types

typedef enum LLKeyframeMotion::e_constraint_type EConstraintType
typedef enum LLKeyframeMotion::e_constraint_target_type EConstraintTargetType
 TYPE_POINT
 TYPE_PLANE
 TYPE_BODY
 TYPE_GROUND
 ASSET_LOADED
 ASSET_FETCHED
 ASSET_NEEDS_FETCH
 ASSET_FETCH_FAILED
 ASSET_UNDEFINED
 IT_STEP
 IT_LINEAR
 IT_SPLINE
enum  e_constraint_type { TYPE_POINT, TYPE_PLANE }
enum  e_constraint_target_type { TYPE_BODY, TYPE_GROUND }
enum  AssetStatus {
  ASSET_LOADED, ASSET_FETCHED, ASSET_NEEDS_FETCH, ASSET_FETCH_FAILED,
  ASSET_UNDEFINED
}
enum  InterpolationType { IT_STEP, IT_LINEAR, IT_SPLINE }

Public Member Functions

 LLKeyframeMotion (const LLUUID &id)
virtual ~LLKeyframeMotion ()
virtual BOOL getLoop ()
virtual F32 getDuration ()
virtual F32 getEaseInDuration ()
virtual F32 getEaseOutDuration ()
virtual LLJoint::JointPriority getPriority ()
virtual LLMotionBlendType getBlendType ()
virtual F32 getMinPixelArea ()
virtual LLMotionInitStatus onInitialize (LLCharacter *character)
virtual BOOL onActivate ()
virtual BOOL onUpdate (F32 time, U8 *joint_mask)
virtual void onDeactivate ()
virtual void setStopTime (F32 time)
U32 getFileSize ()
BOOL serialize (LLDataPacker &dp) const
BOOL deserialize (LLDataPacker &dp)
void writeCAL3D (apr_file_t *fp)
BOOL isLoaded ()
void setLoop (BOOL loop)
F32 getLoopIn ()
F32 getLoopOut ()
void setLoopIn (F32 in_point)
void setLoopOut (F32 out_point)
void setHandPose (LLHandMotion::eHandPose pose)
LLHandMotion::eHandPose getHandPose ()
void setPriority (S32 priority)
void setEmote (const LLUUID &emote_id)
void setEaseIn (F32 ease_in)
void setEaseOut (F32 ease_in)
F32 getLastUpdateTime ()
const LLBBoxLocalgetPelvisBBox ()

Static Public Member Functions

static LLMotioncreate (const LLUUID &id)
static void setVFS (LLVFS *vfs)
static void onLoadComplete (LLVFS *vfs, const LLUUID &asset_uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status)
static void flushKeyframeCache ()

Protected Types

typedef std::list< JointConstraint * > constraint_list_t

Protected Member Functions

void applyKeyframes (F32 time)
void applyConstraints (F32 time, U8 *joint_mask)
void activateConstraint (JointConstraint *constraintp)
void initializeConstraint (JointConstraint *constraint)
void deactivateConstraint (JointConstraint *constraintp)
void applyConstraint (JointConstraint *constraintp, F32 time, U8 *joint_mask)
BOOL setupPose ()

Protected Attributes

JointMotionListmJointMotionList
LLJointStatemJointStates
LLJointmPelvisp
LLCharactermCharacter
std::string mEmoteName
constraint_list_t mConstraints
U32 mLastSkeletonSerialNum
F32 mLastUpdateTime
F32 mLastLoopedTime
AssetStatus mAssetStatus

Static Protected Attributes

static LLVFSsVFS = NULL

Friends

class LLKeyframeDataCache

Classes

class  JointConstraint
class  JointConstraintSharedData
class  JointMotion
class  JointMotionList
class  PositionCurve
class  PositionKey
class  RotationCurve
class  RotationKey
class  ScaleCurve
class  ScaleKey

Detailed Description

Definition at line 65 of file llkeyframemotion.h.


Member Typedef Documentation

typedef std::list<JointConstraint*> LLKeyframeMotion::constraint_list_t [protected]

Definition at line 432 of file llkeyframemotion.h.

typedef enum LLKeyframeMotion::e_constraint_target_type LLKeyframeMotion::EConstraintTargetType

typedef enum LLKeyframeMotion::e_constraint_type LLKeyframeMotion::EConstraintType


Member Enumeration Documentation

enum LLKeyframeMotion::AssetStatus

Enumerator:
ASSET_LOADED 
ASSET_FETCHED 
ASSET_NEEDS_FETCH 
ASSET_FETCH_FAILED 
ASSET_UNDEFINED 

Definition at line 281 of file llkeyframemotion.h.

enum LLKeyframeMotion::e_constraint_target_type

Enumerator:
TYPE_BODY 
TYPE_GROUND 

Definition at line 203 of file llkeyframemotion.h.

enum LLKeyframeMotion::e_constraint_type

Enumerator:
TYPE_POINT 
TYPE_PLANE 

Definition at line 197 of file llkeyframemotion.h.

enum LLKeyframeMotion::InterpolationType

Enumerator:
IT_STEP 
IT_LINEAR 
IT_SPLINE 

Definition at line 283 of file llkeyframemotion.h.


Constructor & Destructor Documentation

LLKeyframeMotion::LLKeyframeMotion ( const LLUUID id  ) 

Definition at line 431 of file llkeyframemotion.cpp.

Referenced by create().

LLKeyframeMotion::~LLKeyframeMotion (  )  [virtual]

Definition at line 449 of file llkeyframemotion.cpp.

References mConstraints, and mJointStates.


Member Function Documentation

void LLKeyframeMotion::activateConstraint ( JointConstraint constraintp  )  [protected]

Definition at line 830 of file llkeyframemotion.cpp.

References LLCharacter::getGround(), LLCharacter::getPosGlobalFromAgent(), LLCharacter::getVolumePos(), LLJoint::getWorldPosition(), LLJoint::getWorldRotation(), LLKeyframeMotion::JointConstraint::mActive, LLKeyframeMotion::JointConstraintSharedData::mChainLength, mCharacter, LLKeyframeMotion::JointConstraintSharedData::mConstraintTargetType, LLKeyframeMotion::JointConstraint::mGroundNorm, LLKeyframeMotion::JointConstraint::mGroundPos, LLKeyframeMotion::JointConstraintSharedData::mJointStateIndices, mJointStates, mPelvisp, LLKeyframeMotion::JointConstraint::mPositions, LLKeyframeMotion::JointConstraint::mSharedData, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintOffset, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintVolume, LLKeyframeMotion::JointConstraintSharedData::mTargetConstraintOffset, LLKeyframeMotion::JointConstraint::mWeight, S32, TRUE, and TYPE_GROUND.

Referenced by applyConstraint().

void LLKeyframeMotion::applyConstraint ( JointConstraint constraintp,
F32  time,
U8 joint_mask 
) [protected]

Definition at line 877 of file llkeyframemotion.cpp.

References activateConstraint(), clamp_rescale(), LLVector3::clearVec(), deactivateConstraint(), dist_vec(), dist_vec_squared(), f, FALSE, LLCharacter::findCollisionVolume(), fsqrtf, LLCriticalDamp::getInterpolant(), LLJointState::getJoint(), LLJoint::getJointNum(), LLJoint::getParent(), LLCharacter::getPixelArea(), LLCharacter::getPosAgentFromGlobal(), LLJoint::getPosition(), getPriority(), LLJointState::getRotation(), LLJoint::getRotation(), LLCharacter::getVolumePos(), LLJoint::getWorldPosition(), LLJoint::getWorldRotation(), LLVector3::isExactlyZero(), JOINT_LENGTH_K, lerp(), llabs(), llmax(), llmin(), llround(), LLKeyframeMotion::JointConstraint::mActive, MAX_CHAIN_LENGTH, MAX_ITERATIONS, MAX_PIXEL_AREA_CONSTRAINTS, LLKeyframeMotion::JointConstraintSharedData::mChainLength, mCharacter, LLKeyframeMotion::JointConstraintSharedData::mConstraintTargetType, LLKeyframeMotion::JointConstraintSharedData::mConstraintType, LLKeyframeMotion::JointConstraintSharedData::mEaseInStartTime, LLKeyframeMotion::JointConstraintSharedData::mEaseInStopTime, LLKeyframeMotion::JointConstraintSharedData::mEaseOutStartTime, LLKeyframeMotion::JointConstraintSharedData::mEaseOutStopTime, LLKeyframeMotion::JointConstraint::mFixupDistanceRMS, LLKeyframeMotion::JointConstraint::mGroundNorm, LLKeyframeMotion::JointConstraint::mGroundPos, MIN_ACCELERATION_SQUARED, MIN_ITERATION_COUNT, MIN_ITERATIONS, MIN_PIXEL_AREA_CONSTRAINTS, LLKeyframeMotion::JointConstraint::mJointLengthFractions, LLKeyframeMotion::JointConstraint::mJointLengths, LLKeyframeMotion::JointConstraintSharedData::mJointStateIndices, mJointStates, mLastUpdateTime, mPelvisp, LLKeyframeMotion::JointConstraint::mPositions, LLKeyframeMotion::JointConstraint::mSharedData, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintOffset, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintVolume, LLKeyframeMotion::JointConstraintSharedData::mTargetConstraintOffset, LLKeyframeMotion::JointConstraintSharedData::mTargetConstraintVolume, LLKeyframeMotion::JointConstraint::mTotalLength, LLKeyframeMotion::JointConstraint::mWeight, nlerp(), LLVector3::normVec(), NULL, LLJointState::POS, S32, LLJointState::setPosition(), LLJointState::setRotation(), LLJoint::setRotation(), LLQuaternion::shortestArc(), TYPE_BODY, TYPE_GROUND, and TYPE_PLANE.

Referenced by applyConstraints().

void LLKeyframeMotion::applyConstraints ( F32  time,
U8 joint_mask 
) [protected]

Definition at line 723 of file llkeyframemotion.cpp.

References applyConstraint(), LLCharacter::getSkeletonSerialNum(), initializeConstraint(), mCharacter, mConstraints, and mLastSkeletonSerialNum.

Referenced by onUpdate().

void LLKeyframeMotion::applyKeyframes ( F32  time  )  [protected]

Definition at line 693 of file llkeyframemotion.cpp.

References LLCharacter::getAnimationData(), i, mCharacter, LLKeyframeMotion::JointMotionList::mDuration, LLKeyframeMotion::JointMotionList::mHandPose, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, mJointStates, LLKeyframeMotion::JointMotionList::mMaxPriority, LLKeyframeMotion::JointMotionList::mNumJointMotions, LLCharacter::setAnimationData(), and LLKeyframeMotion::JointMotion::update().

Referenced by onUpdate().

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

Reimplemented from LLMotion.

Reimplemented in LLKeyframeFallMotion, LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 461 of file llkeyframemotion.cpp.

References LLKeyframeMotion().

Referenced by LLMotionRegistry::createMotion(), and LLVOAvatar::LLVOAvatar().

void LLKeyframeMotion::deactivateConstraint ( JointConstraint constraintp  )  [protected]

Definition at line 857 of file llkeyframemotion.cpp.

References FALSE, LLKeyframeMotion::JointConstraint::mActive, LLKeyframeMotion::JointConstraintSharedData::mConstraintTargetType, LLKeyframeMotion::JointConstraint::mSharedData, LLKeyframeMotion::JointConstraint::mSourceVolume, LLKeyframeMotion::JointConstraint::mTargetVolume, LLJoint::mUpdateXform, and TYPE_GROUND.

Referenced by applyConstraint(), and onDeactivate().

BOOL LLKeyframeMotion::deserialize ( LLDataPacker dp  ) 

Definition at line 1144 of file llkeyframemotion.cpp.

References LLJoint::ADDITIVE_PRIORITY, LLKeyframeDataCache::addKeyframeData(), LLBBoxLocal::addPoint(), ASSET_LOADED, f, FALSE, LLCharacter::findCollisionVolume(), LLCharacter::getCollisionVolumeID(), LLMotion::getID(), LLCharacter::getJoint(), LLJoint::getName(), LLJoint::getParent(), LLJointState::getUsage(), i, IT_LINEAR, j, KEYFRAME_MOTION_SUBVERSION, KEYFRAME_MOTION_VERSION, LL_CHARACTER_MAX_JOINTS, LL_MAX_PELVIS_OFFSET, llendl, llerrs, llwarns, mAssetStatus, MAX_CONSTRAINTS, mayaQ(), LLKeyframeMotion::JointMotionList::mBasePriority, mCharacter, LLKeyframeMotion::JointMotionList::mConstraints, LLKeyframeMotion::JointMotionList::mDuration, LLKeyframeMotion::JointMotionList::mEaseInDuration, LLKeyframeMotion::JointMotionList::mEaseOutDuration, mEmoteName, LLKeyframeMotion::JointMotionList::mHandPose, LLKeyframeMotion::PositionCurve::mInterpolationType, LLKeyframeMotion::RotationCurve::mInterpolationType, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, LLKeyframeMotion::JointMotion::mJointName, mJointStates, LLKeyframeMotion::PositionCurve::mKeys, LLKeyframeMotion::RotationCurve::mKeys, LLKeyframeMotion::JointMotionList::mLoop, LLKeyframeMotion::JointMotionList::mLoopInPoint, LLKeyframeMotion::JointMotionList::mLoopOutPoint, LLKeyframeMotion::JointMotionList::mMaxPriority, LLKeyframeMotion::JointMotionList::mNumJointMotions, LLKeyframeMotion::PositionCurve::mNumKeys, LLKeyframeMotion::RotationCurve::mNumKeys, LLKeyframeMotion::JointMotionList::mPelvisBBox, LLKeyframeMotion::PositionKey::mPosition, LLKeyframeMotion::JointMotion::mPositionCurve, LLKeyframeMotion::JointMotion::mPriority, LLKeyframeMotion::RotationKey::mRotation, LLKeyframeMotion::JointMotion::mRotationCurve, LLKeyframeMotion::PositionKey::mTime, LLKeyframeMotion::RotationKey::mTime, LLKeyframeMotion::JointMotion::mUsage, LLVector3::mV, LLJointState::POS, LLJointState::ROT, S32, LLJointState::setJoint(), LLJointState::setPriority(), setupPose(), LLJointState::setUsage(), StringToOrder(), TRUE, TYPE_BODY, TYPE_GROUND, U16_to_F32(), LLDataPacker::unpackBinaryDataFixed(), LLDataPacker::unpackF32(), LLQuaternion::unpackFromVector3(), LLDataPacker::unpackS32(), LLDataPacker::unpackString(), LLDataPacker::unpackU16(), LLDataPacker::unpackU32(), LLDataPacker::unpackU8(), LLDataPacker::unpackVector3(), LLJoint::USE_MOTION_PRIORITY, VX, VY, VZ, x, y, and z.

Referenced by onInitialize(), onLoadComplete(), and LLFloaterAnimPreview::postBuild().

void LLKeyframeMotion::flushKeyframeCache (  )  [static]

Definition at line 1862 of file llkeyframemotion.cpp.

Referenced by LLVOAvatar::resetAnimations().

virtual LLMotionBlendType LLKeyframeMotion::getBlendType (  )  [inline, virtual]

Implements LLMotion.

Definition at line 120 of file llkeyframemotion.h.

References LLMotion::NORMAL_BLEND.

virtual F32 LLKeyframeMotion::getDuration (  )  [inline, virtual]

Implements LLMotion.

Definition at line 97 of file llkeyframemotion.h.

References LLKeyframeMotion::JointMotionList::mDuration, and mJointMotionList.

Referenced by LLFloaterAnimPreview::onCommitLoop(), LLFloaterAnimPreview::onCommitLoopOut(), LLKeyframeWalkMotion::onUpdate(), LLKeyframeFallMotion::onUpdate(), LLFloaterAnimPreview::postBuild(), LLFloaterAnimPreview::refresh(), LLFloaterAnimPreview::validateEaseIn(), LLFloaterAnimPreview::validateEaseOut(), and writeCAL3D().

virtual F32 LLKeyframeMotion::getEaseInDuration (  )  [inline, virtual]

Implements LLMotion.

Reimplemented in LLKeyframeFallMotion.

Definition at line 103 of file llkeyframemotion.h.

References LLKeyframeMotion::JointMotionList::mEaseInDuration, and mJointMotionList.

Referenced by LLFloaterAnimPreview::postBuild(), and LLFloaterAnimPreview::validateEaseOut().

virtual F32 LLKeyframeMotion::getEaseOutDuration (  )  [inline, virtual]

Implements LLMotion.

Definition at line 109 of file llkeyframemotion.h.

References LLKeyframeMotion::JointMotionList::mEaseOutDuration, and mJointMotionList.

Referenced by LLFloaterAnimPreview::postBuild(), setStopTime(), and LLFloaterAnimPreview::validateEaseIn().

U32 LLKeyframeMotion::getFileSize (  ) 

Definition at line 1781 of file llkeyframemotion.cpp.

References LLDataPackerBinaryBuffer::getCurrentSize(), and serialize().

Referenced by LLFloaterAnimPreview::onBtnOK().

LLHandMotion::eHandPose LLKeyframeMotion::getHandPose (  )  [inline]

Definition at line 179 of file llkeyframemotion.h.

References LLHandMotion::HAND_POSE_RELAXED, LLKeyframeMotion::JointMotionList::mHandPose, and mJointMotionList.

Referenced by LLFloaterAnimPreview::postBuild().

F32 LLKeyframeMotion::getLastUpdateTime (  )  [inline]

Definition at line 191 of file llkeyframemotion.h.

References mLastLoopedTime.

Referenced by LLFloaterAnimPreview::refresh().

virtual BOOL LLKeyframeMotion::getLoop (  )  [inline, virtual]

Implements LLMotion.

Definition at line 91 of file llkeyframemotion.h.

References FALSE, mJointMotionList, and LLKeyframeMotion::JointMotionList::mLoop.

Referenced by LLFloaterAnimPreview::postBuild(), LLFloaterAnimPreview::validateEaseIn(), and LLFloaterAnimPreview::validateEaseOut().

F32 LLKeyframeMotion::getLoopIn (  )  [inline]

Definition at line 163 of file llkeyframemotion.h.

References mJointMotionList, and LLKeyframeMotion::JointMotionList::mLoopInPoint.

Referenced by LLFloaterAnimPreview::postBuild().

F32 LLKeyframeMotion::getLoopOut (  )  [inline]

Definition at line 167 of file llkeyframemotion.h.

References mJointMotionList, and LLKeyframeMotion::JointMotionList::mLoopOutPoint.

Referenced by LLFloaterAnimPreview::postBuild().

virtual F32 LLKeyframeMotion::getMinPixelArea (  )  [inline, virtual]

Implements LLMotion.

Definition at line 123 of file llkeyframemotion.h.

References MIN_REQUIRED_PIXEL_AREA_KEYFRAME.

const LLBBoxLocal & LLKeyframeMotion::getPelvisBBox (  ) 

Definition at line 1793 of file llkeyframemotion.cpp.

References mJointMotionList, and LLKeyframeMotion::JointMotionList::mPelvisBBox.

Referenced by LLFloaterAnimPreview::postBuild().

virtual LLJoint::JointPriority LLKeyframeMotion::getPriority (  )  [inline, virtual]

Implements LLMotion.

Definition at line 115 of file llkeyframemotion.h.

References LLJoint::LOW_PRIORITY, LLKeyframeMotion::JointMotionList::mBasePriority, and mJointMotionList.

Referenced by applyConstraint(), and LLFloaterAnimPreview::postBuild().

void LLKeyframeMotion::initializeConstraint ( JointConstraint constraint  )  [protected]

Definition at line 790 of file llkeyframemotion.cpp.

References dist_vec(), LLCharacter::findCollisionVolume(), LLJointState::getJoint(), LLJoint::getParent(), LLCharacter::getVolumePos(), LLJoint::getWorldPosition(), LLKeyframeMotion::JointConstraintSharedData::mChainLength, mCharacter, LLKeyframeMotion::JointConstraint::mJointLengthFractions, LLKeyframeMotion::JointConstraint::mJointLengths, LLKeyframeMotion::JointConstraintSharedData::mJointStateIndices, mJointStates, LLKeyframeMotion::JointConstraint::mSharedData, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintOffset, LLKeyframeMotion::JointConstraintSharedData::mSourceConstraintVolume, LLKeyframeMotion::JointConstraint::mSourceVolume, LLKeyframeMotion::JointConstraintSharedData::mTargetConstraintVolume, LLKeyframeMotion::JointConstraint::mTargetVolume, LLKeyframeMotion::JointConstraint::mTotalLength, and S32.

Referenced by applyConstraints(), and setupPose().

BOOL LLKeyframeMotion::isLoaded (  )  [inline]

Definition at line 157 of file llkeyframemotion.h.

References mJointMotionList, and NULL.

Referenced by LLPreviewAnim::saveAnim().

BOOL LLKeyframeMotion::onActivate (  )  [virtual]

Implements LLMotion.

Reimplemented in LLKeyframeFallMotion, LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 627 of file llkeyframemotion.cpp.

References gAnimLibrary, mCharacter, mEmoteName, mLastLoopedTime, LLCharacter::startMotion(), LLAnimationLibrary::stringToAnimState(), and TRUE.

Referenced by LLKeyframeWalkMotion::onActivate(), LLKeyframeStandMotion::onActivate(), and LLKeyframeFallMotion::onActivate().

void LLKeyframeMotion::onDeactivate (  )  [virtual]

Implements LLMotion.

Reimplemented in LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 751 of file llkeyframemotion.cpp.

References deactivateConstraint(), and mConstraints.

Referenced by LLKeyframeWalkMotion::onDeactivate(), and LLKeyframeStandMotion::onDeactivate().

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

Implements LLMotion.

Reimplemented in LLKeyframeFallMotion, LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 469 of file llkeyframemotion.cpp.

References ASSET_FETCH_FAILED, ASSET_FETCHED, ASSET_LOADED, ASSET_NEEDS_FETCH, LLAssetType::AT_ANIMATION, deserialize(), FALSE, gAssetStorage, LLAssetStorage::getAssetData(), LLMotion::getID(), LLCharacter::getID(), LLCharacter::getJoint(), LLKeyframeDataCache::getKeyframeData(), LLMotion::getName(), LLVFile::getSize(), i, lldebugs, llendl, llerrs, llwarns, mAssetStatus, mCharacter, LLMotion::mID, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, mJointStates, LLKeyframeMotion::JointMotionList::mNumJointMotions, NULL, onLoadComplete(), LLVFile::read(), S32, LLJointState::setPriority(), setupPose(), LLJointState::setUsage(), LLMotion::STATUS_FAILURE, LLMotion::STATUS_HOLD, LLMotion::STATUS_SUCCESS, and sVFS.

Referenced by LLKeyframeWalkMotion::onInitialize(), LLKeyframeStandMotion::onInitialize(), and LLKeyframeFallMotion::onInitialize().

void LLKeyframeMotion::onLoadComplete ( LLVFS vfs,
const LLUUID asset_uuid,
LLAssetType::EType  type,
void user_data,
S32  status,
LLExtStat  ext_status 
) [static]

Definition at line 1938 of file llkeyframemotion.cpp.

References ASSET_FETCH_FAILED, ASSET_LOADED, LLCharacter::createMotion(), deserialize(), end, LLMotion::getID(), LLMotion::getName(), LLVFile::getSize(), lldebugs, llendl, llwarns, mAssetStatus, LLVFile::read(), LLVFile::READ, S32, LLCharacter::sInstances, and size.

Referenced by onInitialize().

BOOL LLKeyframeMotion::onUpdate ( F32  time,
U8 joint_mask 
) [virtual]

Implements LLMotion.

Reimplemented in LLKeyframeFallMotion, LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 643 of file llkeyframemotion.cpp.

References applyConstraints(), applyKeyframes(), f, llassert, llmin(), LLKeyframeMotion::JointMotionList::mDuration, mJointMotionList, mLastLoopedTime, mLastUpdateTime, LLKeyframeMotion::JointMotionList::mLoop, LLKeyframeMotion::JointMotionList::mLoopInPoint, LLKeyframeMotion::JointMotionList::mLoopOutPoint, and LLMotion::mStopped.

Referenced by LLKeyframeWalkMotion::onUpdate(), LLKeyframeStandMotion::onUpdate(), and LLKeyframeFallMotion::onUpdate().

BOOL LLKeyframeMotion::serialize ( LLDataPacker dp  )  const

Definition at line 1683 of file llkeyframemotion.cpp.

References f, F32_to_U16(), LLCharacter::findCollisionVolume(), LLJoint::getName(), i, KEYFRAME_MOTION_SUBVERSION, KEYFRAME_MOTION_VERSION, LL_MAX_PELVIS_OFFSET, LLKeyframeMotion::JointMotionList::mBasePriority, mCharacter, LLKeyframeMotion::JointMotionList::mConstraints, LLKeyframeMotion::JointMotionList::mDuration, LLKeyframeMotion::JointMotionList::mEaseInDuration, LLKeyframeMotion::JointMotionList::mEaseOutDuration, mEmoteName, LLKeyframeMotion::JointMotionList::mHandPose, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, LLKeyframeMotion::JointMotionList::mLoop, LLKeyframeMotion::JointMotionList::mLoopInPoint, LLKeyframeMotion::JointMotionList::mLoopOutPoint, LLKeyframeMotion::JointMotionList::mNumJointMotions, LLVector3::mV, LLDataPacker::packBinaryDataFixed(), LLDataPacker::packF32(), LLDataPacker::packS32(), LLDataPacker::packString(), LLDataPacker::packU16(), LLDataPacker::packU32(), LLDataPacker::packU8(), LLDataPacker::packVector3(), LLVector3::quantize16(), TRUE, TYPE_GROUND, VX, VY, VZ, x, y, and z.

Referenced by getFileSize(), and LLFloaterAnimPreview::onBtnOK().

void LLKeyframeMotion::setEaseIn ( F32  ease_in  ) 

Definition at line 1839 of file llkeyframemotion.cpp.

References f, llmax(), LLKeyframeMotion::JointMotionList::mEaseInDuration, and mJointMotionList.

Referenced by LLFloaterAnimPreview::onCommitEaseIn().

void LLKeyframeMotion::setEaseOut ( F32  ease_in  ) 

Definition at line 1850 of file llkeyframemotion.cpp.

References f, llmax(), LLKeyframeMotion::JointMotionList::mEaseOutDuration, and mJointMotionList.

Referenced by LLFloaterAnimPreview::onCommitEaseOut().

void LLKeyframeMotion::setEmote ( const LLUUID emote_id  ) 

Definition at line 1823 of file llkeyframemotion.cpp.

References LLAnimationLibrary::animStateToString(), gAnimLibrary, and mEmoteName.

Referenced by LLFloaterAnimPreview::onCommitEmote().

void LLKeyframeMotion::setHandPose ( LLHandMotion::eHandPose  pose  )  [inline]

Definition at line 175 of file llkeyframemotion.h.

References LLKeyframeMotion::JointMotionList::mHandPose, and mJointMotionList.

Referenced by LLFloaterAnimPreview::onCommitHandPose().

void LLKeyframeMotion::setLoop ( BOOL  loop  ) 

Definition at line 1871 of file llkeyframemotion.cpp.

References F32_MAX, mJointMotionList, LLKeyframeMotion::JointMotionList::mLoop, and LLMotion::mSendStopTimestamp.

Referenced by LLFloaterAnimPreview::onCommitLoop().

void LLKeyframeMotion::setLoopIn ( F32  in_point  ) 

Definition at line 1884 of file llkeyframemotion.cpp.

References i, LLKeyframeMotion::JointMotionList::mDuration, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, LLKeyframeMotion::JointMotionList::mLoopInPoint, and LLKeyframeMotion::JointMotionList::mNumJointMotions.

Referenced by LLFloaterAnimPreview::onCommitLoop(), LLFloaterAnimPreview::onCommitLoopIn(), and setupPose().

void LLKeyframeMotion::setLoopOut ( F32  out_point  ) 

Definition at line 1911 of file llkeyframemotion.cpp.

References i, LLKeyframeMotion::JointMotionList::mDuration, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, LLKeyframeMotion::JointMotionList::mLoopOutPoint, and LLKeyframeMotion::JointMotionList::mNumJointMotions.

Referenced by LLFloaterAnimPreview::onCommitLoop(), LLFloaterAnimPreview::onCommitLoopOut(), and setupPose().

void LLKeyframeMotion::setPriority ( S32  priority  ) 

Definition at line 1801 of file llkeyframemotion.cpp.

References LLJoint::HIGHEST_PRIORITY, i, llclamp(), LLJoint::LOW_PRIORITY, LLKeyframeMotion::JointMotionList::mBasePriority, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, mJointStates, LLKeyframeMotion::JointMotionList::mMaxPriority, LLKeyframeMotion::JointMotionList::mNumJointMotions, and S32.

Referenced by LLFloaterAnimPreview::onCommitPriority().

void LLKeyframeMotion::setStopTime ( F32  time  )  [virtual]

Reimplemented from LLMotion.

Definition at line 765 of file llkeyframemotion.cpp.

References getEaseOutDuration(), llmax(), LLMotion::mActivationTimestamp, LLKeyframeMotion::JointMotionList::mDuration, mJointMotionList, LLKeyframeMotion::JointMotionList::mLoop, LLKeyframeMotion::JointMotionList::mLoopInPoint, LLKeyframeMotion::JointMotionList::mLoopOutPoint, LLMotion::mStopTimestamp, and LLMotion::setStopTime().

BOOL LLKeyframeMotion::setupPose (  )  [protected]

Definition at line 587 of file llkeyframemotion.cpp.

References LLMotion::addJointState(), FALSE, LLCharacter::getJoint(), initializeConstraint(), mCharacter, mConstraints, LLKeyframeMotion::JointMotionList::mConstraints, mJointMotionList, mJointStates, LLKeyframeMotion::JointMotionList::mLoopInPoint, LLKeyframeMotion::JointMotionList::mLoopOutPoint, LLKeyframeMotion::JointMotionList::mNumJointMotions, mPelvisp, setLoopIn(), setLoopOut(), and TRUE.

Referenced by deserialize(), and onInitialize().

static void LLKeyframeMotion::setVFS ( LLVFS vfs  )  [inline, static]

Definition at line 145 of file llkeyframemotion.h.

References sVFS.

Referenced by LLVOAvatar::LLVOAvatar().

void LLKeyframeMotion::writeCAL3D ( apr_file_t *  fp  ) 

Definition at line 2012 of file llkeyframemotion.cpp.

References getDuration(), LLCharacter::getJoint(), mCharacter, LLKeyframeMotion::JointMotionList::mJointMotionArray, mJointMotionList, LLKeyframeMotion::JointMotionList::mNumJointMotions, LLKeyframeMotion::PositionKey::mPosition, LLQuaternion::mQ, LLVector3::mV, LLJointState::POS, S32, LLVector3::scaleVec(), VW, VX, VY, and VZ.

Referenced by LLPreviewAnim::saveAnim(), and LLVOAvatar::writeCAL3D().


Friends And Related Function Documentation

friend class LLKeyframeDataCache [friend]

Definition at line 68 of file llkeyframemotion.h.


Member Data Documentation

AssetStatus LLKeyframeMotion::mAssetStatus [protected]

Definition at line 437 of file llkeyframemotion.h.

Referenced by deserialize(), onInitialize(), and onLoadComplete().

LLCharacter* LLKeyframeMotion::mCharacter [protected]

Reimplemented in LLKeyframeFallMotion, LLKeyframeStandMotion, and LLKeyframeWalkMotion.

Definition at line 430 of file llkeyframemotion.h.

Referenced by activateConstraint(), applyConstraint(), applyConstraints(), applyKeyframes(), deserialize(), initializeConstraint(), onActivate(), onInitialize(), serialize(), setupPose(), and writeCAL3D().

constraint_list_t LLKeyframeMotion::mConstraints [protected]

Definition at line 433 of file llkeyframemotion.h.

Referenced by applyConstraints(), onDeactivate(), setupPose(), and ~LLKeyframeMotion().

std::string LLKeyframeMotion::mEmoteName [protected]

Definition at line 431 of file llkeyframemotion.h.

Referenced by deserialize(), onActivate(), serialize(), and setEmote().

JointMotionList* LLKeyframeMotion::mJointMotionList [protected]

Definition at line 427 of file llkeyframemotion.h.

Referenced by applyKeyframes(), deserialize(), getDuration(), getEaseInDuration(), getEaseOutDuration(), getHandPose(), getLoop(), getLoopIn(), getLoopOut(), getPelvisBBox(), getPriority(), isLoaded(), onInitialize(), LLKeyframeFallMotion::onInitialize(), onUpdate(), serialize(), setEaseIn(), setEaseOut(), setHandPose(), setLoop(), setLoopIn(), setLoopOut(), setPriority(), setStopTime(), setupPose(), and writeCAL3D().

LLJointState* LLKeyframeMotion::mJointStates [protected]

Definition at line 428 of file llkeyframemotion.h.

Referenced by activateConstraint(), applyConstraint(), applyKeyframes(), deserialize(), initializeConstraint(), onInitialize(), LLKeyframeFallMotion::onInitialize(), setPriority(), setupPose(), and ~LLKeyframeMotion().

F32 LLKeyframeMotion::mLastLoopedTime [protected]

Definition at line 436 of file llkeyframemotion.h.

Referenced by getLastUpdateTime(), onActivate(), and onUpdate().

U32 LLKeyframeMotion::mLastSkeletonSerialNum [protected]

Definition at line 434 of file llkeyframemotion.h.

Referenced by applyConstraints().

F32 LLKeyframeMotion::mLastUpdateTime [protected]

Definition at line 435 of file llkeyframemotion.h.

Referenced by applyConstraint(), and onUpdate().

LLJoint* LLKeyframeMotion::mPelvisp [protected]

Definition at line 429 of file llkeyframemotion.h.

Referenced by activateConstraint(), applyConstraint(), and setupPose().

LLVFS * LLKeyframeMotion::sVFS = NULL [static, protected]

Definition at line 422 of file llkeyframemotion.h.

Referenced by onInitialize(), and setVFS().


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