123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef __SMOKEPARTICLES_H__
- #define __SMOKEPARTICLES_H__
- typedef struct singleSmoke_s {
- struct singleSmoke_s * next;
- int privateStartTime;
- int index;
- idRandom random;
- idVec3 origin;
- idMat3 axis;
- int timeGroup;
- } singleSmoke_t;
- typedef struct {
- const idParticleStage * stage;
- singleSmoke_t * smokes;
- } activeSmokeStage_t;
- class idSmokeParticles {
- public:
- idSmokeParticles();
-
- void Init();
- void Shutdown();
-
- bool EmitSmoke( const idDeclParticle *smoke, const int startTime, const float diversity,
- const idVec3 &origin, const idMat3 &axis, int timeGroup );
-
- void FreeSmokes();
- private:
- bool initialized;
- renderEntity_t renderEntity;
- int renderEntityHandle;
- static const int MAX_SMOKE_PARTICLES = 10000;
- singleSmoke_t smokes[MAX_SMOKE_PARTICLES];
- idList<activeSmokeStage_t, TAG_PARTICLE> activeStages;
- singleSmoke_t * freeSmokes;
- int numActiveSmokes;
- int currentParticleTime;
- bool UpdateRenderEntity( renderEntity_s *renderEntity, const renderView_t *renderView );
- static bool ModelCallback( renderEntity_s *renderEntity, const renderView_t *renderView );
- };
- #endif
|