1
0
forked from 0ad/0ad
0ad/source/tools/ape/ext/Particle.h
janwas b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00

63 lines
1.3 KiB
C++

/*==================================================================
|
| Name: Particle.h
|
|===================================================================
|
| Overview: A single particle, currently only utilized by
| CParticleEmitter. Public variables are for performance
| reasons.
|
|
| Usage: Instantiate a particle, set public variables, then call
| Frame() every frame.
==================================================================*/
#ifndef PARTICLE_H
#define PARTICLE_H
//--------------------------------------------------------
// Includes / Compiler directives
//--------------------------------------------------------
#include "Vector3D.h"
#include "Sprite.h"
//--------------------------------------------------------
// Declarations
//--------------------------------------------------------
class CParticle
{
public:
CParticle();
~CParticle();
// necessary pre-processing immediately before first update call
void Init();
void Frame();
void Update();
void Render();
void Reset();
void SetColour(float r, float g, float b, float a);
CSprite * m_sprite;
float m_duration;
double m_timeOfLastFrame;
double m_timeElapsedTotal;
CVector3D m_position;
CVector3D m_velocity;
CVector3D m_gravity;
float m_colour[4];
float m_colourInc[3];
};
#endif // PARTICLE_H