Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Particle.h

Go to the documentation of this file.
00001 
00007 #ifndef PARTICLE_H_UMW285
00008 #define PARTICLE_H_UMW285
00009 
00010 #include "IsoBomb.h"
00011 #include "Effect.h"
00012 #include "Point3D.h"
00013 #include "Rect.h"
00014 #include "Vector3D.h"
00015 
00019 class Particle : public Effect {
00020 public:
00028     Particle( const Point3D& initPos, const Vector3D& initVect, float life );
00029 
00033     virtual ~Particle();
00034 
00039     static void initTextures( GraphicsDevice dev );
00040 
00045     static void releaseTextures();
00046 
00050     void setColor( DWORD color );
00051 
00055     void setSize( float size );
00056 
00062     void setBounceFactor( float fact );
00063 
00064     virtual bool update( float dt );
00065 
00066     virtual void draw( const Point& anchor );
00067 
00068     virtual float getHeight() const;
00069 
00070     virtual bool needsTransform() const;
00071 
00072     virtual const Rect& getPosition() const;
00073 
00074 private:
00079     struct ParticleVertex {
00080         float x, y, z;
00081         float rhw;
00082         DWORD color;
00083         float u, v;
00084     };
00085 
00086     static ParticleVertex v[4];
00087 
00091     Particle();
00092 
00093     float life;
00094 
00095     Point3D pos;
00096 
00100     Vector3D vect;
00101 
00106     Rect cached;
00107 
00111     DWORD color;
00112 
00116     float size;
00117 
00121     float bounceF;
00122 
00123     static Texture tex;
00124 };
00125 
00126 #endif

Generated on Tue Mar 4 02:29:25 2003 for SuperIsoBomb by doxygen1.2.18