SuperTuxKart
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. More...
 
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. More...
 
bool isExplodeKartObject () const
 
bool isFlattenKartObject () const
 
void setPaused (bool mode)
 
- 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. More...
 
float getAnimationDuration () const
 

Private Attributes

TrackObjectm_object
 
bool m_crash_reset
 True if a collision with this object should trigger rescuing a kart. More...
 
bool m_explode_kart
 True if a collision with this object should trigger "exploding" a kart. More...
 
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. More...
 
bool m_important_animation
 If true, play animation even when GFX are disabled.
 

Additional Inherited Members

- Protected Attributes inherited from AnimationBase
PtrVector< Ipom_all_ipos
 All IPOs for this animation. More...
 
bool m_playing
 True if the animation is currently playing. More...
 
float m_animation_duration
 
float m_current_time
 The current time used in the IPOs. More...
 

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.

◆ ~ThreeDAnimation()

ThreeDAnimation::~ThreeDAnimation ( )
virtual

Destructor.

Member Function Documentation

◆ isCrashReset()

bool ThreeDAnimation::isCrashReset ( ) const
inline

Returns true if a collision with this object should trigger a rescue.

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

Member Data Documentation

◆ m_crash_reset

bool ThreeDAnimation::m_crash_reset
private

True if a collision with this object should trigger rescuing a kart.

◆ m_explode_kart

bool ThreeDAnimation::m_explode_kart
private

True if a collision with this object should trigger "exploding" a kart.

◆ m_hpr

Vec3 ThreeDAnimation::m_hpr
private

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.


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