20 _minMaxOutOfDate(true)
38 std::ostringstream oss;
39 oss <<
"Joint " << id;
51 "Trying to create a joint with an already existing id.");
66 SL_WARN_MSG(
"*** Playback found in SLAnimSkeleton::getNodeAnimPlayack ***");
74 assert(
id <
_joints.size() &&
"Index out of bounds");
93 jointWM[i] =
_joints[i]->updateAndGetWM() *
_joints[i]->offsetMat();
102 "animation with same name already exists!");
123 j->resetToInitialState();
196 SLVec3f jointPos = joint->updateAndGetWM().translation();
#define SL_WARN_MSG(message)
vector< SLMat4f > SLVMat4f
SLVec3< SLfloat > SLVec3f
SLAnimManager is the central class for all animation handling.
SLVAnimPlayback & animPlaybacks()
SLVstring & animationNames()
Manages the playback of an SLAnimation.
SLfloat localTime() const
void advanceTime(SLfloat delta)
SLAnimation * parentAnimation()
SLMAnimPlayback _animPlaybacks
map of animation playbacks for this skeleton
void getJointMatrices(SLVMat4f &jointWM)
SLVec3f _minOS
min point in os for this skeleton (attribute for skeleton instance)
SLAnimPlayback * animPlayback(const SLstring &name)
SLJoint * _rootJoint
pointer to the root joint of skeleton
SLbool updateAnimations(SLfloat elapsedTimeSec)
SLbool _minMaxOutOfDate
dirty flag aabb rebuild
SLMAnimation _animations
map of animations for this skeleton
SLVec3f _maxOS
max point in os for this skeleton (attribute for skeleton instance)
SLJoint * createJoint(SLuint id)
SLAnimation * createAnimation(SLAnimManager &aniMan, const SLstring &name, SLfloat duration)
SLJoint * getJoint(SLuint id)
SLVJoint _joints
joint vector for fast access and index to joint mapping
SLAnimation is the base container for all animation data.
void apply(SLfloat time, SLfloat weight=1.0f, SLfloat scale=1.0f)
Specialized SLNode that represents a single joint (or bone) in a skeleton.
T * find(const SLstring &name="", SLbool findRecursive=true)