|
SuperTuxKart
|
A virtual base class for all animations. More...
#include <three_d_animation.hpp>

Public Member Functions | |
| ThreeDAnimation (const XMLNode &node, TrackObject *object) | |
| virtual | ~ThreeDAnimation () |
| Destructor. | |
| virtual void | update (float dt) |
| This needs to be implemented by the inheriting classes. More... | |
| void | updateWithWorldTicks (bool with_physics) |
| Updates position and rotation of this model. More... | |
| bool | isCrashReset () const |
| Returns true if a collision with this object should trigger a rescue. | |
| bool | isExplodeKartObject () const |
| bool | isFlattenKartObject () const |
| void | setPaused (bool mode) |
| ThreeDAnimation * | clone (TrackObject *obj) |
| Copying to child process of track object. | |
Public Member Functions inherited from AnimationBase | |
| AnimationBase (const XMLNode &node) | |
| AnimationBase (Ipo *ipo) | |
| Special constructor which takes one IPO (or curve). More... | |
| virtual void | update (float dt, Vec3 *xyz=NULL, Vec3 *hpr=NULL, Vec3 *scale=NULL) |
| Updates the time, position and rotation. More... | |
| virtual void | getAt (float time, Vec3 *xyz=NULL, Vec3 *hpr=NULL, Vec3 *scale=NULL) |
| Return the time, position and rotation at the specified time. More... | |
| virtual void | getDerivativeAt (float time, Vec3 *xyz) |
| Returns the derivative at the specified point. More... | |
| void | setInitialTransform (const Vec3 &xyz, const Vec3 &hpr) |
| Stores the initial transform (in the IPOs actually). More... | |
| void | reset () |
| Resets all IPOs for this animation. | |
| void | setPlaying (bool playing) |
| Disables or enables an animation. | |
| float | getAnimationDuration () const |
Private Attributes | |
| TrackObject * | m_object |
| bool | m_crash_reset |
| True if a collision with this object should trigger rescuing a kart. | |
| bool | m_explode_kart |
| True if a collision with this object should trigger "exploding" a kart. | |
| bool | m_flatten_kart |
| bool | m_is_paused |
| True if animation is currently paused by scripts. | |
| Vec3 | m_hpr |
| We have to store the rotation value as computed in blender, since irrlicht uses a different order, so for rotation animations we can not use the value returned by getRotation from a scene node. | |
| bool | m_important_animation |
| If true, play animation even when GFX are disabled. | |
Additional Inherited Members | |
Protected Attributes inherited from AnimationBase | |
| std::vector< Ipo * > | m_all_ipos |
| All IPOs for this animation. | |
| bool | m_playing |
| True if the animation is currently playing. | |
| float | m_animation_duration |
| float | m_current_time |
| The current time used in the IPOs. | |
A virtual base class for all animations.
| ThreeDAnimation::ThreeDAnimation | ( | const XMLNode & | node, |
| TrackObject * | object | ||
| ) |
Save the initial position and rotation in the base animation object.
|
inlinevirtual |
This needs to be implemented by the inheriting classes.
It is called once per frame from the track. It has a dummy implementation that just asserts so that this class can be instantiated in CannonAnimation.
Reimplemented from AnimationBase.
| void ThreeDAnimation::updateWithWorldTicks | ( | bool | has_physics | ) |
Updates position and rotation of this model.
Called once per time step.