4 #include "util/ParaMemPool.h" 5 #include "FileManager.h" 19 Vector3 pos, speed, down, origin;
21 float size, life, maxlife, random_force, trail_length;
22 float rotation, rotSpeed;
27 typedef FixedSizedAllocator<Particle> DL_Allocator_ParticleList;
28 typedef std::list<Particle, DL_Allocator_ParticleList > ParticleListType;
34 ParticleListType particles;
53 ParticleList():m_pSceneState(NULL),m_bUseAbsCord(true), m_vLastRenderOrigin(0,0,0),m_bUpdated(false),m_anim(0), m_time(0),m_rem(0){};
62 TYPE_PLANE_PARTICLE_EMITTER=1,
63 TYPE_SPHERE_PARTICLE_EMITTER=2,
67 virtual Particle newParticle(
int anim,
int time) = 0;
68 virtual int GetEmitterType()=0;
75 Particle newParticle(
int anim,
int time);
76 virtual int GetEmitterType(){
return (
int)TYPE_PLANE_PARTICLE_EMITTER;};
83 Particle newParticle(
int anim,
int time);
84 virtual int GetEmitterType(){
return (
int)TYPE_SPHERE_PARTICLE_EMITTER;};
167 std::vector<TexCoordSet> tiles;
169 int32 m_texture_index;
191 bool rotate2SpeedDirection;
197 void update(
SceneState * pSceneState,
float dt);
200 void ClearAllInstances();
203 DeviceTexturePtr_type GetDeviceTexture();
222 bool DeleteInstance(
void * owner);
225 void setup(
SceneState * pSceneState,
int anim,
int time);
231 void drawAllAbsInstances();
241 void SetTextureRowsCols(
int nRows,
int nCols);
266 float length, seglen;
271 float tabove, tbelow;
274 bool m_bUseAbsCord:1;
276 int32 m_texture_index;
278 std::list<RibbonSegment> segs;
284 void setup(
SceneState * pSceneState,
int anim,
int time);
289 DeviceTexturePtr_type GetDeviceTexture();
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
Vector3 m_vLastRenderOrigin
the last render origin when the update() function is called.
Definition: particle.h:39
map< void *, ParticleList * > m_instances
instances of the particle systems.
Definition: particle.h:189
int blend
how the texture blending is applied to each particle.
Definition: particle.h:150
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
int m_time
current frame
Definition: particle.h:47
4-dimensional homogeneous vector.
Definition: ParaVector4.h:10
bool billboard
whether using billboard when during the particles. In most cases, this is true, because particles are...
Definition: particle.h:159
this is another kind of particle system.
Definition: particle.h:253
Animated< float > speed
initial speed, the initial speed magnitude of a particle is V(0) = speed + variation * rand(-1...
Definition: particle.h:105
Definition: particle.h:56
different physics engine has different winding order.
Definition: EventBinding.h:32
float m_rem
remaining time to spawn new particles
Definition: particle.h:49
Animated< float > lifespan
maxlife of a newly born particle in seconds
Definition: particle.h:111
a single animated bone, it contains both the bone instance data and all animation data of the bone...
Definition: ParaXBone.h:15
Definition: particle.h:71
int order
the triangle winding order of the quad: whether it is CCW(-1) or CW(0). It does not matter if particl...
Definition: particle.h:152
int m_anim
current animation
Definition: particle.h:45
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
it represents the instance of the particle system.
Definition: particle.h:32
Definition: particle.h:244
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
Animated< float > variation
initial speed variation, the initial speed magnitude of a particle is V(0) = speed + variation * rand...
Definition: particle.h:107
The particle class keeps a list of all of its instances.A particle system instance is always associat...
Definition: particle.h:99
CParaXModel * GetParent()
get the parent model.
Definition: particle.h:234
Animated< float > areaw
the half width of the emitter plane
Definition: particle.h:117
Animated< float > spread
RESERVED: this parameter is reserved for other emitter types.
Definition: particle.h:120
Definition: particle.h:87
float tofs
this is just a rand seed for this particle system.
Definition: particle.h:184
float slowdown
it controls how fast the speed magnitude of a particle dwindles as its life is approaching the end...
Definition: particle.h:130
float mid
the color[0] and sizes[0] is the color and size of a particle at its birth the color[1] and sizes[1] ...
Definition: particle.h:141
Animated< float > lat
RESERVED: this parameter is reserved for other emitter types.
Definition: particle.h:122
Animated< float > areal
the half length of the emitter plane
Definition: particle.h:115
Animated< float > grav2
RESERVED: this parameter is reserved for other emitter types.
Definition: particle.h:124
Definition: particle.h:18
ParaX model is the model file for character animation, etc in the game world.
Definition: ParaXModel.h:30
Animated< float > gravity
particle acceleration magnitude along their current directions, shared by all existing particles at a...
Definition: particle.h:109
int type
this is 0,1,2.
Definition: particle.h:156
void * m_pSceneState
to which scene state this particle instance is associated.
Definition: particle.h:51
Animated< float > rate
how many particles to spawn per second.
Definition: particle.h:113
Vector3 pos
all particles are offset by this value at its birth. this is usually V(0,0,0).
Definition: particle.h:146
Definition: particle.h:79