Sprite class. More...
#include "base/module.hh"#include "math/module.hh"#include "math/funcs_trig.hh"#include "gfx/module.hh"#include "gfx/osg.hh"#include "gfx/osg_funcs.hh"#include "object/module.hh"#include "fx/module.hh"#include "fx/sprite.hh"Namespaces | |
| namespace | fx |
Special-effects. | |
Defines | |
| #define | FX_SPRITE_CC 1 |
| #define | SPRITE_INIT_VERTEXS() |
| #define | SPRITE_ROTATE_X_Y_ABS(V, S, C, X, Y) |
| #define | SPRITE_ROTATE_X_Y_REL(V, S, C) |
| #define | SPRITE_ROTATE_VERTEXS_ABS(V, SINCOS) |
| #define | SPRITE_ROTATE_VERTEXS_REL(V, SINCOS) |
Sprite class.
| #define FX_SPRITE_CC 1 |
| #define SPRITE_INIT_VERTEXS | ( | ) |
{{ \
const fp w = mWidth * 0.5f; \
\
(*mVertexs)[0][XX] = -w; \
(*mVertexs)[0][YY] = -w; \
\
(*mVertexs)[1][XX] = w; \
(*mVertexs)[1][YY] = -w; \
\
(*mVertexs)[2][XX] = w; \
(*mVertexs)[2][YY] = w; \
\
(*mVertexs)[3][XX] = -w; \
(*mVertexs)[3][YY] = w; \
\
(*mVertexs)[0][ZZ] = \
(*mVertexs)[1][ZZ] = \
(*mVertexs)[2][ZZ] = \
(*mVertexs)[3][ZZ] = 0.0f; \
}}
Macros (hi-freq). The ABS macros do an absolute rotation (from zero angle). The REL macros incrementally rotate from current angle.
| #define SPRITE_ROTATE_VERTEXS_ABS | ( | V, | ||
| SINCOS | ||||
| ) |
{{ \
const fp w = mWidth * 0.5f; \
SPRITE_ROTATE_X_Y_ABS( (V)[0], SINCOS.first, SINCOS.second, -w, -w ) \
SPRITE_ROTATE_X_Y_ABS( (V)[1], SINCOS.first, SINCOS.second, w, -w ) \
SPRITE_ROTATE_X_Y_ABS( (V)[2], SINCOS.first, SINCOS.second, w, w ) \
SPRITE_ROTATE_X_Y_ABS( (V)[3], SINCOS.first, SINCOS.second, -w, w ) \
}}
| #define SPRITE_ROTATE_VERTEXS_REL | ( | V, | ||
| SINCOS | ||||
| ) |
{{ \
SPRITE_ROTATE_X_Y_REL( (V)[0], SINCOS.first, SINCOS.second ); \
SPRITE_ROTATE_X_Y_REL( (V)[1], SINCOS.first, SINCOS.second ); \
SPRITE_ROTATE_X_Y_REL( (V)[2], SINCOS.first, SINCOS.second ); \
SPRITE_ROTATE_X_Y_REL( (V)[3], SINCOS.first, SINCOS.second ); \
}}
| #define SPRITE_ROTATE_X_Y_ABS | ( | V, | ||
| S, | ||||
| C, | ||||
| X, | ||||
| Y | ||||
| ) |
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:10