SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ThreeDAnimation Class Reference

A virtual base class for all animations. More...

#include <three_d_animation.hpp>

Inheritance diagram for ThreeDAnimation:
Inheritance graph
[legend]

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.
 
void updateWithWorldTicks (bool with_physics)
 Updates position and rotation of this model.
 
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)
 
ThreeDAnimationclone (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).
 
virtual void update (float dt, Vec3 *xyz=NULL, Vec3 *hpr=NULL, Vec3 *scale=NULL)
 Updates the time, position and rotation.
 
virtual void getAt (float time, Vec3 *xyz=NULL, Vec3 *hpr=NULL, Vec3 *scale=NULL)
 Return the time, position and rotation at the specified time.
 
virtual void getDerivativeAt (float time, Vec3 *xyz)
 Returns the derivative at the specified point.
 
virtual void update (float dt)
 This needs to be implemented by the inheriting classes.
 
void setInitialTransform (const Vec3 &xyz, const Vec3 &hpr)
 Stores the initial transform (in the IPOs actually).
 
void reset ()
 Resets all IPOs for this animation.
 
void setPlaying (bool playing)
 Disables or enables an animation.
 
float getAnimationDuration () const
 

Private Attributes

TrackObjectm_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.
 

Detailed Description

A virtual base class for all animations.

Constructor & Destructor Documentation

◆ ThreeDAnimation()

ThreeDAnimation::ThreeDAnimation ( const XMLNode node,
TrackObject object 
)

Save the initial position and rotation in the base animation object.

Member Function Documentation

◆ update()

virtual void ThreeDAnimation::update ( float  dt)
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.

◆ updateWithWorldTicks()

void ThreeDAnimation::updateWithWorldTicks ( bool  has_physics)

Updates position and rotation of this model.

Called once per time step.


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