FireExplosion Class Reference

Fire explosion effect. More...

#include <fire_explosion.h>

Inheritance diagram for FireExplosion:

Explosion Templates::Observer< Camera > TimeUpdateable GraphicalNode

List of all members.

Public Member Functions

 FireExplosion (SbColor color, Camera *camera)
 Constructor.
virtual ~FireExplosion ()
 Destructor.
FireExplosionclone () 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 &)
FireExplosionoperator= (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.


Detailed Description

Fire explosion effect.

Reference object (cannot be copied).


Constructor & Destructor Documentation

FireExplosion::FireExplosion ( const FireExplosion  )  [private]

FireExplosion::FireExplosion ( SbColor  color,
Camera camera 
)

Constructor.

Parameters:
[in] color Explosion color.
[in] camera Main camera.
Camera is needed bacuase this implementation needs it to adjust the explosion image.

virtual FireExplosion::~FireExplosion (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
[in] dt Time difference between the last call (delta).

Implements TimeUpdateable.

virtual void FireExplosion::update ( Camera subject  )  [virtual]

Observable object changed its state.

Parameters:
[in] subject Observable object.
This method is a reaction to the observable object (arg) state change.

Implements Templates::Observer< Camera >.


Member Data Documentation

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.

Current texture index.

SoSeparator* FireExplosion::_billboard [private]

Explosion image (animated texture) separator.

SoTextureCoordinate2* FireExplosion::_textureCoord [private]

Texture (image) coordinate.

SoRotationXYZ* FireExplosion::_rotX [private]

Rotation in the X axis.

SoRotationXYZ* FireExplosion::_rotY [private]

Rotation in the Y axis.


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

Generated on Sat Dec 20 19:21:24 2008 for PGR2008 by  doxygen 1.5.6