LLCharacter Class Reference

#include <llcharacter.h>

Inheritance diagram for LLCharacter:

Inheritance graph
[legend]
Collaboration diagram for LLCharacter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLCharacter ()
virtual ~LLCharacter ()
virtual const char * getAnimationPrefix ()=0
virtual LLJointgetRootJoint ()=0
virtual LLJointgetJoint (const std::string &name)
virtual LLVector3 getCharacterPosition ()=0
virtual LLQuaternion getCharacterRotation ()=0
virtual LLVector3 getCharacterVelocity ()=0
virtual LLVector3 getCharacterAngularVelocity ()=0
virtual void getGround (const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm)=0
virtual BOOL allocateCharacterJoints (U32 num)=0
virtual LLJointgetCharacterJoint (U32 i)=0
virtual F32 getTimeDilation ()=0
virtual F32 getPixelArea () const =0
virtual LLPolyMeshgetHeadMesh ()=0
virtual LLPolyMeshgetUpperBodyMesh ()=0
virtual LLVector3d getPosGlobalFromAgent (const LLVector3 &position)=0
virtual LLVector3 getPosAgentFromGlobal (const LLVector3d &position)=0
virtual void updateVisualParams ()
virtual void addDebugText (const std::string &text)=0
virtual const LLUUIDgetID ()=0
BOOL addMotion (const LLUUID &id, LLMotionConstructor create)
void removeMotion (const LLUUID &id)
LLMotioncreateMotion (const LLUUID &id)
virtual BOOL startMotion (const LLUUID &id, F32 start_offset=0.f)
virtual BOOL stopMotion (const LLUUID &id, BOOL stop_immediate=FALSE)
BOOL isMotionActive (const LLUUID &id)
virtual void requestStopMotion (LLMotion *motion)
void updateMotion (BOOL force_update=FALSE)
LLAnimPauseRequest requestPause ()
BOOL areAnimationsPaused ()
void setAnimTimeFactor (F32 factor)
void setTimeStep (F32 time_step)
virtual void flushAllMotions ()
virtual void deactivateAllMotions ()
virtual void dumpCharacter (LLJoint *joint=NULL)
virtual F32 getPreferredPelvisHeight ()
virtual LLVector3 getVolumePos (S32 joint_index, LLVector3 &volume_offset)
virtual LLJointfindCollisionVolume (U32 volume_id)
virtual S32 getCollisionVolumeID (std::string &name)
void setAnimationData (std::string name, void *data)
void * getAnimationData (std::string name)
void removeAnimationData (std::string name)
void addVisualParam (LLVisualParam *param)
void addSharedVisualParam (LLVisualParam *param)
BOOL setVisualParamWeight (LLVisualParam *which_param, F32 weight, BOOL set_by_user=FALSE)
BOOL setVisualParamWeight (const char *param_name, F32 weight, BOOL set_by_user=FALSE)
BOOL setVisualParamWeight (S32 index, F32 weight, BOOL set_by_user=FALSE)
F32 getVisualParamWeight (LLVisualParam *distortion)
F32 getVisualParamWeight (const char *param_name)
F32 getVisualParamWeight (S32 index)
void clearVisualParamWeights ()
BOOL visualParamWeightsAreDefault ()
LLVisualParamgetFirstVisualParam ()
LLVisualParamgetNextVisualParam ()
LLVisualParamgetVisualParam (S32 id)
S32 getVisualParamID (LLVisualParam *id)
S32 getVisualParamCount ()
LLVisualParamgetVisualParam (const char *name)
ESex getSex ()
void setSex (ESex sex)
U32 getAppearanceSerialNum () const
void setAppearanceSerialNum (U32 num)
U32 getSkeletonSerialNum () const
void setSkeletonSerialNum (U32 num)

Static Public Attributes

static std::vector< LLCharacter * > sInstances

Protected Types

typedef std::map< std::string,
void * > 
animation_data_map_t

Protected Attributes

LLMotionController mMotionController
animation_data_map_t mAnimationData
F32 mPreferredPelvisHeight
ESex mSex
U32 mAppearanceSerialNum
U32 mSkeletonSerialNum
LLAnimPauseRequest mPauseRequest

Private Types

typedef std::map< S32,
LLVisualParam * > 
VisualParamIndexMap_t
typedef std::map< char
*, LLVisualParam * > 
VisualParamNameMap_t

Private Attributes

VisualParamIndexMap_t mVisualParamIndexMap
VisualParamIndexMap_t::iterator mCurIterator
VisualParamNameMap_t mVisualParamNameMap

Static Private Attributes

static LLStringTable sVisualParamNames


Detailed Description

Definition at line 60 of file llcharacter.h.


Member Typedef Documentation

typedef std::map<std::string, void *> LLCharacter::animation_data_map_t [protected]

Definition at line 259 of file llcharacter.h.

typedef std::map<S32, LLVisualParam *> LLCharacter::VisualParamIndexMap_t [private]

Definition at line 271 of file llcharacter.h.

typedef std::map<char *, LLVisualParam *> LLCharacter::VisualParamNameMap_t [private]

Definition at line 274 of file llcharacter.h.


Constructor & Destructor Documentation

LLCharacter::LLCharacter (  ) 

Definition at line 52 of file llcharacter.cpp.

References mMotionController, mPauseRequest, LLMotionController::setCharacter(), and sInstances.

Here is the call graph for this function:

LLCharacter::~LLCharacter (  )  [virtual]

Definition at line 69 of file llcharacter.cpp.

References getFirstVisualParam(), getNextVisualParam(), and sInstances.

Here is the call graph for this function:


Member Function Documentation

virtual const char* LLCharacter::getAnimationPrefix (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeMotionParam::loadMotions().

Here is the caller graph for this function:

virtual LLJoint* LLCharacter::getRootJoint (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by dumpCharacter(), and getJoint().

Here is the caller graph for this function:

LLJoint * LLCharacter::getJoint ( const std::string &  name  )  [virtual]

virtual LLVector3 LLCharacter::getCharacterPosition (  )  [pure virtual]

virtual LLQuaternion LLCharacter::getCharacterRotation (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeFallMotion::onActivate().

Here is the caller graph for this function:

virtual LLVector3 LLCharacter::getCharacterVelocity (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeFallMotion::onActivate(), LLFlyAdjustMotion::onUpdate(), and LLWalkAdjustMotion::onUpdate().

Here is the caller graph for this function:

virtual LLVector3 LLCharacter::getCharacterAngularVelocity (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLFlyAdjustMotion::onUpdate(), and LLWalkAdjustMotion::onUpdate().

Here is the caller graph for this function:

virtual void LLCharacter::getGround ( const LLVector3 inPos,
LLVector3 outPos,
LLVector3 outNorm 
) [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeMotion::activateConstraint(), LLKeyframeFallMotion::onActivate(), and LLKeyframeStandMotion::onUpdate().

Here is the caller graph for this function:

virtual BOOL LLCharacter::allocateCharacterJoints ( U32  num  )  [pure virtual]

Implemented in LLVOAvatar.

virtual LLJoint* LLCharacter::getCharacterJoint ( U32  i  )  [pure virtual]

Implemented in LLVOAvatar.

virtual F32 LLCharacter::getTimeDilation (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLFlyAdjustMotion::onUpdate(), and LLWalkAdjustMotion::onUpdate().

Here is the caller graph for this function:

virtual F32 LLCharacter::getPixelArea (  )  const [pure virtual]

virtual LLPolyMesh* LLCharacter::getHeadMesh (  )  [pure virtual]

Implemented in LLVOAvatar.

virtual LLPolyMesh* LLCharacter::getUpperBodyMesh (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLHandMotion::onActivate().

Here is the caller graph for this function:

virtual LLVector3d LLCharacter::getPosGlobalFromAgent ( const LLVector3 position  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeMotion::activateConstraint(), LLWalkAdjustMotion::onActivate(), and LLWalkAdjustMotion::onUpdate().

Here is the caller graph for this function:

virtual LLVector3 LLCharacter::getPosAgentFromGlobal ( const LLVector3d position  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeMotion::applyConstraint().

Here is the caller graph for this function:

void LLCharacter::updateVisualParams (  )  [virtual]

Reimplemented in LLVOAvatar.

Definition at line 481 of file llcharacter.cpp.

References getFirstVisualParam(), getNextVisualParam(), and mSex.

Referenced by LLVOAvatar::idleUpdate(), LLEmote::onActivate(), LLHandMotion::onActivate(), LLEmote::onDeactivate(), LLEmote::onUpdate(), LLEyeMotion::onUpdate(), LLHandMotion::onUpdate(), and LLVOAvatar::updateVisualParams().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLCharacter::addDebugText ( const std::string &  text  )  [pure virtual]

Implemented in LLVOAvatar.

virtual const LLUUID& LLCharacter::getID (  )  [pure virtual]

Implemented in LLVOAvatar.

Referenced by LLKeyframeMotion::onInitialize().

Here is the caller graph for this function:

BOOL LLCharacter::addMotion ( const LLUUID id,
LLMotionConstructor  create 
)

Definition at line 108 of file llcharacter.cpp.

References LLMotionController::addMotion(), and mMotionController.

Referenced by LLVOAvatar::LLVOAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::removeMotion ( const LLUUID id  ) 

Definition at line 116 of file llcharacter.cpp.

References mMotionController, and LLMotionController::removeMotion().

Referenced by LLFloaterAnimPreview::onBtnOK().

Here is the call graph for this function:

Here is the caller graph for this function:

LLMotion * LLCharacter::createMotion ( const LLUUID id  ) 

Definition at line 124 of file llcharacter.cpp.

References LLMotionController::createMotion(), and mMotionController.

Referenced by LLKeyframeMotionParam::addKeyframeMotion(), LLPreviewAnim::LLPreviewAnim(), LLVOAvatar::LLVOAvatar(), LLKeyframeMotion::onLoadComplete(), and LLFloaterAnimPreview::postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLCharacter::startMotion ( const LLUUID id,
F32  start_offset = 0.f 
) [virtual]

Reimplemented in LLVOAvatar.

Definition at line 132 of file llcharacter.cpp.

References mMotionController, and LLMotionController::startMotion().

Referenced by LLKeyframeMotion::onActivate(), and LLVOAvatar::startMotion().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLCharacter::stopMotion ( const LLUUID id,
BOOL  stop_immediate = FALSE 
) [virtual]

Reimplemented in LLVOAvatar.

Definition at line 141 of file llcharacter.cpp.

References mMotionController, and LLMotionController::stopMotionLocally().

Referenced by LLVOAvatar::stopMotion().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLCharacter::isMotionActive ( const LLUUID id  ) 

Definition at line 149 of file llcharacter.cpp.

References FALSE, LLMotionController::findMotion(), LLMotionController::isMotionActive(), and mMotionController.

Referenced by LLFloaterAnimPreview::onBtnPlay(), LLFloaterAnimPreview::onSliderMove(), LLFloaterAnimPreview::refresh(), and LLVOAvatar::updateCharacter().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::requestStopMotion ( LLMotion motion  )  [virtual]

Reimplemented in LLVOAvatar.

Definition at line 164 of file llcharacter.cpp.

Referenced by LLMotionController::updateMotionsByType().

Here is the caller graph for this function:

void LLCharacter::updateMotion ( BOOL  force_update = FALSE  ) 

Definition at line 173 of file llcharacter.cpp.

References LLMotionController::isPaused(), mMotionController, mPauseRequest, LLMotionController::pause(), LLMotionController::unpause(), and LLMotionController::updateMotion().

Referenced by LLPreviewAnimation::render(), and LLVOAvatar::updateCharacter().

Here is the call graph for this function:

Here is the caller graph for this function:

LLAnimPauseRequest LLCharacter::requestPause (  ) 

BOOL LLCharacter::areAnimationsPaused (  )  [inline]

void LLCharacter::setAnimTimeFactor ( F32  factor  )  [inline]

Definition at line 168 of file llcharacter.h.

References mMotionController, and LLMotionController::setTimeFactor().

Referenced by slow_mo_animations().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::setTimeStep ( F32  time_step  )  [inline]

Definition at line 169 of file llcharacter.h.

References mMotionController, and LLMotionController::setTimeStep().

Referenced by LLPreviewAnimation::render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::flushAllMotions (  )  [virtual]

Definition at line 207 of file llcharacter.cpp.

References LLMotionController::flushAllMotions(), and mMotionController.

Referenced by LLVOAvatar::buildCharacter(), and LLVOAvatar::resetAnimations().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::deactivateAllMotions (  )  [virtual]

Definition at line 198 of file llcharacter.cpp.

References LLMotionController::deactivateAllMotions(), and mMotionController.

Referenced by LLToolsStopAllAnimations::handleEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLCharacter::dumpCharacter ( LLJoint joint = NULL  )  [virtual]

Definition at line 216 of file llcharacter.cpp.

References LLJoint::getName(), LLJoint::getParent(), getRootJoint(), llendl, llinfos, LLJoint::mChildren, and NULL.

Here is the call graph for this function:

virtual F32 LLCharacter::getPreferredPelvisHeight (  )  [inline, virtual]

Definition at line 181 of file llcharacter.h.

References mPreferredPelvisHeight.

Referenced by LLKeyframeFallMotion::getEaseInDuration().

Here is the caller graph for this function:

virtual LLVector3 LLCharacter::getVolumePos ( S32  joint_index,
LLVector3 volume_offset 
) [inline, virtual]

Reimplemented in LLVOAvatar.

Definition at line 183 of file llcharacter.h.

References LLVector3::zero.

Referenced by LLKeyframeMotion::activateConstraint(), LLKeyframeMotion::applyConstraint(), and LLKeyframeMotion::initializeConstraint().

Here is the caller graph for this function:

virtual LLJoint* LLCharacter::findCollisionVolume ( U32  volume_id  )  [inline, virtual]

Reimplemented in LLVOAvatar.

Definition at line 185 of file llcharacter.h.

References NULL.

Referenced by LLKeyframeMotion::applyConstraint(), LLKeyframeMotion::deserialize(), LLKeyframeMotion::initializeConstraint(), and LLKeyframeMotion::serialize().

Here is the caller graph for this function:

virtual S32 LLCharacter::getCollisionVolumeID ( std::string &  name  )  [inline, virtual]

Reimplemented in LLVOAvatar.

Definition at line 187 of file llcharacter.h.

Referenced by LLKeyframeMotion::deserialize().

Here is the caller graph for this function:

void LLCharacter::setAnimationData ( std::string  name,
void *  data 
)

void * LLCharacter::getAnimationData ( std::string  name  ) 

void LLCharacter::removeAnimationData ( std::string  name  ) 

void LLCharacter::addVisualParam ( LLVisualParam param  ) 

void LLCharacter::addSharedVisualParam ( LLVisualParam param  ) 

Definition at line 420 of file llcharacter.cpp.

References LLVisualParam::getID(), LLVisualParam::getName(), LLVisualParam::getNextParam(), llendl, llwarns, mVisualParamIndexMap, S32, and LLVisualParam::setNextParam().

Referenced by LLVOAvatar::loadMeshNodes().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLCharacter::setVisualParamWeight ( LLVisualParam which_param,
F32  weight,
BOOL  set_by_user = FALSE 
)

BOOL LLCharacter::setVisualParamWeight ( const char *  param_name,
F32  weight,
BOOL  set_by_user = FALSE 
)

Definition at line 281 of file llcharacter.cpp.

References LLStringTable::checkString(), FALSE, llendl, llwarns, mVisualParamNameMap, sVisualParamNames, LLStringBase< char >::toLower(), and TRUE.

Here is the call graph for this function:

BOOL LLCharacter::setVisualParamWeight ( S32  index,
F32  weight,
BOOL  set_by_user = FALSE 
)

Definition at line 299 of file llcharacter.cpp.

References FALSE, llendl, llwarns, mVisualParamIndexMap, and TRUE.

F32 LLCharacter::getVisualParamWeight ( LLVisualParam distortion  ) 

F32 LLCharacter::getVisualParamWeight ( const char *  param_name  ) 

Definition at line 332 of file llcharacter.cpp.

References LLStringTable::checkString(), llendl, llwarns, mVisualParamNameMap, sVisualParamNames, and LLStringBase< char >::toLower().

Here is the call graph for this function:

F32 LLCharacter::getVisualParamWeight ( S32  index  ) 

Definition at line 349 of file llcharacter.cpp.

References llendl, llwarns, and mVisualParamIndexMap.

void LLCharacter::clearVisualParamWeights (  ) 

Definition at line 366 of file llcharacter.cpp.

References FALSE, getFirstVisualParam(), getNextVisualParam(), and VISUAL_PARAM_GROUP_TWEAKABLE.

Referenced by LLAgent::clearVisualParams().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLCharacter::visualParamWeightsAreDefault (  ) 

Definition at line 382 of file llcharacter.cpp.

References getFirstVisualParam(), getNextVisualParam(), and VISUAL_PARAM_GROUP_TWEAKABLE.

Referenced by LLVOAvatar::updateIsFullyLoaded().

Here is the call graph for this function:

Here is the caller graph for this function:

LLVisualParam* LLCharacter::getFirstVisualParam (  )  [inline]

LLVisualParam* LLCharacter::getNextVisualParam (  )  [inline]

LLVisualParam* LLCharacter::getVisualParam ( S32  id  )  [inline]

S32 LLCharacter::getVisualParamID ( LLVisualParam id  )  [inline]

Definition at line 231 of file llcharacter.h.

References mVisualParamIndexMap.

S32 LLCharacter::getVisualParamCount (  )  [inline]

Definition at line 241 of file llcharacter.h.

References mVisualParamIndexMap, and S32.

LLVisualParam * LLCharacter::getVisualParam ( const char *  name  ) 

Definition at line 403 of file llcharacter.cpp.

References LLStringTable::checkString(), llendl, llwarns, mVisualParamNameMap, NULL, sVisualParamNames, and LLStringBase< char >::toLower().

Here is the call graph for this function:

ESex LLCharacter::getSex (  )  [inline]

void LLCharacter::setSex ( ESex  sex  )  [inline]

Definition at line 246 of file llcharacter.h.

References mSex.

Referenced by LLVOAvatar::updateVisualParams().

Here is the caller graph for this function:

U32 LLCharacter::getAppearanceSerialNum (  )  const [inline]

Definition at line 248 of file llcharacter.h.

References mAppearanceSerialNum.

void LLCharacter::setAppearanceSerialNum ( U32  num  )  [inline]

Definition at line 249 of file llcharacter.h.

References mAppearanceSerialNum.

U32 LLCharacter::getSkeletonSerialNum (  )  const [inline]

Definition at line 251 of file llcharacter.h.

References mSkeletonSerialNum.

Referenced by LLPolySkeletalDistortion::apply(), and LLKeyframeMotion::applyConstraints().

Here is the caller graph for this function:

void LLCharacter::setSkeletonSerialNum ( U32  num  )  [inline]

Definition at line 252 of file llcharacter.h.

References mSkeletonSerialNum.

Referenced by LLPolySkeletalDistortion::apply().

Here is the caller graph for this function:


Member Data Documentation

std::vector< LLCharacter * > LLCharacter::sInstances [static]

Definition at line 260 of file llcharacter.h.

Referenced by getAnimationData(), removeAnimationData(), and setAnimationData().

Definition at line 262 of file llcharacter.h.

Referenced by getPreferredPelvisHeight().

ESex LLCharacter::mSex [protected]

Definition at line 263 of file llcharacter.h.

Referenced by getSex(), setSex(), and updateVisualParams().

Definition at line 264 of file llcharacter.h.

Referenced by getAppearanceSerialNum(), and setAppearanceSerialNum().

Definition at line 266 of file llcharacter.h.

Referenced by LLCharacter(), requestPause(), and updateMotion().

VisualParamIndexMap_t::iterator LLCharacter::mCurIterator [private]

Definition at line 273 of file llcharacter.h.

Referenced by getFirstVisualParam(), and getNextVisualParam().


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:39:46 2008 for SecondLife by  doxygen 1.5.5