#include <fire_explosion.h>
Public Member Functions | |
FireExplosion (SbColor color, Camera *camera) | |
Constructor. | |
virtual | ~FireExplosion () |
Destructor. | |
FireExplosion * | clone () const |
Returns a copy of itself. | |
virtual void | timeUpdate (float dt) |
Timer value change event occured. | |
virtual void | update (Camera *subject) |
Observable object changed its state. | |
Private Member Functions | |
FireExplosion (const FireExplosion &) | |
FireExplosion & | operator= (const FireExplosion &) |
Static Private Member Functions | |
static const char * | getRandomTextureFileName () |
Returns random texture file name from available textures. | |
Private Attributes | |
float | _actualTime |
Actual time during the explosion. | |
int | _textureIndex |
Current texture index. | |
SoSeparator * | _billboard |
Explosion image (animated texture) separator. | |
SoTextureCoordinate2 * | _textureCoord |
Texture (image) coordinate. | |
Camera * | _camera |
Camera. | |
SoRotationXYZ * | _rotX |
Rotation in the X axis. | |
SoRotationXYZ * | _rotY |
Rotation in the Y axis. | |
Static Private Attributes | |
static const int | TEXTURE_INDEX_NOT_SET = -1 |
This textureIndex value means that the index is not set. | |
static const int | TEXTURE_INDEX_MIN = 0 |
Minimal texture index. | |
static const int | TEXTURE_INDEX_MAX = 15 |
Maximal texture index. |
Reference object (cannot be copied).
FireExplosion::FireExplosion | ( | const FireExplosion & | ) | [private] |
FireExplosion::FireExplosion | ( | SbColor | color, | |
Camera * | camera | |||
) |
virtual FireExplosion::~FireExplosion | ( | ) | [virtual] |
Destructor.
FireExplosion& FireExplosion::operator= | ( | const FireExplosion & | ) | [private] |
static const char* FireExplosion::getRandomTextureFileName | ( | ) | [static, private] |
Returns random texture file name from available textures.
FireExplosion* FireExplosion::clone | ( | ) | const [virtual] |
Returns a copy of itself.
Memory is allocated on the heap, so it has to be deleted manually.
Implements Explosion.
virtual void FireExplosion::timeUpdate | ( | float | dt | ) | [virtual] |
Timer value change event occured.
This method is called on each timer value change.
[in] | dt | Time difference between the last call (delta). |
Implements TimeUpdateable.
virtual void FireExplosion::update | ( | Camera * | subject | ) | [virtual] |
Observable object changed its state.
[in] | subject | Observable object. |
Implements Templates::Observer< Camera >.
const int FireExplosion::TEXTURE_INDEX_NOT_SET = -1 [static, private] |
This textureIndex value means that the index is not set.
const int FireExplosion::TEXTURE_INDEX_MIN = 0 [static, private] |
Minimal texture index.
const int FireExplosion::TEXTURE_INDEX_MAX = 15 [static, private] |
Maximal texture index.
float FireExplosion::_actualTime [private] |
Actual time during the explosion.
int FireExplosion::_textureIndex [private] |
Current texture index.
SoSeparator* FireExplosion::_billboard [private] |
Explosion image (animated texture) separator.
SoTextureCoordinate2* FireExplosion::_textureCoord [private] |
Texture (image) coordinate.
Camera* FireExplosion::_camera [private] |
SoRotationXYZ* FireExplosion::_rotX [private] |
Rotation in the X axis.
SoRotationXYZ* FireExplosion::_rotY [private] |
Rotation in the Y axis.