#include <AnimatedModel.h>
Inheritance diagram for AnimatedModel:

Public Methods | |
| ~AnimatedModel () | |
| Destructor. | |
| int | findSet (const std::string &setName) const |
| Searches through all of the AnimationSet objects for this model looking for the set given by the specified name. | |
| int | getNumSets () const |
| Returns the number of animation sets for this model. | |
| const std::string & | getSetName (int setIdx) const |
| Returns the name for the animation set given by the index. | |
| int | findAnim (int setIdx, const std::string &animName) const |
| Finds the animation by the name animName in the specified animation set. | |
| int | getNumAnims (int setIdx) const |
| Returns the number of animations for the given set. | |
| const std::string & | getAnimName (int setIdx, int animIdx) const |
| Returns the name of the specified animation in the specified set. | |
| int | getActiveAnim (int setIdx) const |
| Returns the index of the currently running animation for the given set, or -1 if no animation is running. | |
| void | setActiveAnim (int setIdx, int animIdx) |
| Sets the currently active animation for this model. | |
| void | setLooping (int setIdx, bool looping) |
| Sets the looping flag of the specified set. | |
| bool | isLooping (int setIdx) const |
| Gets the looping flag of the specified set. | |
| void | update (float dt) |
| Updates the animation for this model. | |
It is important to note that from the perspective of the program, it is the skeleton that is being animated, and not the skin or mesh. The SkinnedModel simple renders around the skeleton. Thus the AnimatedModel focuses on tying sets of animation to groups of joints in the Skeleton alone, and through the fact the skeleton is moving, the functionality in the SkinnedModel will not need to "know" about animation.
The animations for a model are split up into sets of animations. Each AnimationSet cooresponds to a logical section of the model. For example if a humanoid character was split at the waist, the two animation sets would be "torso animations" and "leg animations." There is no limit on the number of splits on a model (except that an animation set must contain at least one joint). The number of active animations in an AnimatedModel is at most equal to the number of sets it contains, since each AnimatedSet has a currently active animation. In the previous example, the humanoid character would have at most two active animations, one for the legs and one for the torso, that both operate independently.
|
||||||||||||
|
Finds the animation by the name animName in the specified animation set. Returns an index to the animation, or -1 if no animation by that name is found.
|
|
|
Searches through all of the AnimationSet objects for this model looking for the set given by the specified name. Returns an index to that set, or -1 if the set is not found. |
|
|
Returns the index of the currently running animation for the given set, or -1 if no animation is running.
|
|
||||||||||||
|
Returns the name of the specified animation in the specified set. As a special case, the animIdx -1 will return the string "none", so that it is easy to use this method with getActiveAnim.
|
|
|
Returns the number of animations for the given set.
|
|
|
Returns the name for the animation set given by the index.
|
|
|
Gets the looping flag of the specified set.
|
|
||||||||||||
|
Sets the currently active animation for this model. Each set has at most one active animation at a time. If the passed animIdx is out of range (negative numbers are always out of range), then that animation set is disabled.
|
|
||||||||||||
|
Sets the looping flag of the specified set.
|
|
|
Updates the animation for this model. Calling this method will result in modifying the current position of the model's skeleton based on the currently active animations. |
1.2.18