fire_explosion.h

Go to the documentation of this file.
00001 
00014 #ifndef _FIRE_EXPLOSION_H_
00015 #define _FIRE_EXPLOSION_H_
00016 
00017 #include <Inventor/nodes/SoRotation.h>
00018 #include <Inventor/nodes/SoTextureCoordinate2.h>
00019 
00020 #include "camera.h"
00021 #include "explosion.h"
00022 #include "templates/observer.h"
00023 
00029 class FireExplosion: public Explosion, public Templates::Observer<Camera>
00030 {
00031         private:
00032 
00034                 static const int TEXTURE_INDEX_NOT_SET = -1;
00035 
00037                 static const int TEXTURE_INDEX_MIN = 0;
00038 
00040                 static const int TEXTURE_INDEX_MAX = 15;
00041 
00043                 float _actualTime;
00044 
00046                 int _textureIndex;
00047 
00049                 SoSeparator *_billboard;
00050 
00052                 SoTextureCoordinate2 *_textureCoord;
00053 
00055                 Camera *_camera;
00056 
00058                 SoRotationXYZ *_rotX;
00059 
00061                 SoRotationXYZ *_rotY;
00062 
00063         private:
00064 
00065                 // Disable copy constructor and assignment operator
00066                 FireExplosion(const FireExplosion &);
00067                 FireExplosion & operator=(const FireExplosion &);
00068 
00069 
00073                 static const char *getRandomTextureFileName();
00074 
00075         public:
00076 
00086                 FireExplosion(SbColor color, Camera *camera);
00087 
00091                 virtual ~FireExplosion();
00092 
00093                 // Override
00094                 FireExplosion *clone() const;
00095 
00096                 // Override
00097                 virtual void timeUpdate(float dt);
00098 
00099                 // Override
00100                 virtual void update(Camera *subject);
00101 };
00102 
00103 #endif

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