Handles animated textures (textures that move)
More...
#include <moving_texture.hpp>
|
| | MovingTexture (core::matrix4 *matrix, const XMLNode &node) |
| | Constructor for an animated texture. More...
|
| |
| | MovingTexture (core::matrix4 *matrix, float dx, float dy) |
| | Constructor for an animated texture, specifying the speed of the animation directly. More...
|
| |
|
| MovingTexture (float dx, float dy, float dt=0.0f, bool animated_by_step=false) |
| |
|
virtual | ~MovingTexture () |
| | Destructor for an animated texture.
|
| |
|
void | setSpeed (float dx, float dy) |
| | Sets the speed of the animation.
|
| |
|
void | setTextureMatrix (core::matrix4 *matrix) |
| | Sets the texture matrix.
|
| |
|
void | setSPTM (float *sp_tm) |
| |
| virtual void | update (float dt) |
| | Updates the transform of an animated texture. More...
|
| |
|
virtual void | reset () |
| | Resets at (re)start of a race.
|
| |
|
float | getCurrentX () const |
| |
|
float | getCurrentY () const |
| |
|
|
float | m_dx |
| | Translation increment per second.
|
| |
|
float | m_dy |
| |
|
float | m_dt |
| | Delta set by user and count.
|
| |
|
float | m_count |
| |
|
bool | m_isAnimatedByStep |
| |
|
float | m_x |
| | Current x,y position.
|
| |
|
float | m_y |
| |
|
core::matrix4 * | m_matrix |
| | The texture matrix of this texture.
|
| |
|
float * | m_sp_tm |
| |
Handles animated textures (textures that move)
◆ MovingTexture() [1/2]
| MovingTexture::MovingTexture |
( |
core::matrix4 * |
matrix, |
|
|
const XMLNode & |
node |
|
) |
| |
Constructor for an animated texture.
- Parameters
-
| matrix | The texture matrix to modify. |
| node | An XML node containing dx and dy attributes to set the speed of the animation. |
◆ MovingTexture() [2/2]
| MovingTexture::MovingTexture |
( |
core::matrix4 * |
matrix, |
|
|
float |
dx, |
|
|
float |
dy |
|
) |
| |
Constructor for an animated texture, specifying the speed of the animation directly.
- Parameters
-
| matrix | The texture matrix to modify. |
| dx | Speed of the animation in X direction. |
| dy | Speed of the animation in Y direction. |
◆ update()
| void MovingTexture::update |
( |
float |
dt | ) |
|
|
virtual |
Updates the transform of an animated texture.
- Parameters
-
The documentation for this class was generated from the following files: