csNewParticleSystem Class Reference
[Common Plugin Classes]
This is an abstract implementation of a particle system mesh object.
More...
#include <csplugincommon/particlesys/particle.h>
Inheritance diagram for csNewParticleSystem:

Public Member Functions | |
virtual void | AddColor (const csColor &color) |
Add to the current color. | |
void | Compact () |
free as much storage area as possible | |
csNewParticleSystem (iEngine *, iMeshObjectFactory *, int ParticleFlags) | |
constructor | |
float | GetAlpha () const |
Get the probable alpha of the particles. | |
bool | GetChangeAlpha (float &factor) const |
see if change alpha is enabled, and get the value if so. | |
bool | GetChangeColor (csColor &col) const |
see if change color is enabled, and get a copy if so. | |
bool | GetChangeRotation (float &angle) const |
see if change rotation is enabled, and get the angle if so. | |
bool | GetChangeSize (float &factor) const |
see if change size is enabled, and get the value if so. | |
virtual const csColor & | GetColor () const |
Return the base color. | |
virtual iMeshObjectFactory * | GetFactory () const |
Returns 0 since there is no factory for a particle system. | |
virtual bool | GetLighting () const |
Return whether this particle system applies lighting. | |
virtual iMaterialWrapper * | GetMaterialWrapper () const |
Return the current material. | |
virtual uint | GetMixMode () const |
Get mix mode. | |
virtual void | GetObjectBoundingBox (csBox3 &bbox) |
See igeom/objmodel.h for specification. | |
virtual csRenderMesh ** | GetRenderMeshes (int &n, iRenderView *rview, iMovable *movable, uint32 frustum_mask) |
See imesh/object.h for specification. | |
bool | GetSelfDestruct () const |
returns whether the system will self destruct | |
csTicks | GetTimeToLive () const |
if the system will self destruct, returns the time to live in msec. | |
virtual void | NextFrame (csTicks current_time, const csVector3 &pos) |
calls Update() with the amount of time passed since the previous call | |
void | SetAlpha (float alpha) |
Set the alpha of particles. | |
void | SetChangeAlpha (float factor) |
Change alpha of all particles, by factor per second. | |
void | SetChangeColor (const csColor &col) |
Change color of all particles, by col per second. | |
void | SetChangeRotation (float angle) |
Change rotation of all particles, by angle in radians per second. | |
void | SetChangeSize (float factor) |
Change size of all particles, by factor per second. | |
virtual bool | SetColor (const csColor &color) |
Set the base color. | |
void | SetCount (int num) |
grow or shrink the storage area to the specified amount of particles | |
virtual void | SetLighting (bool enable) |
Set whether this particle system applies lighting. | |
virtual bool | SetMaterialWrapper (iMaterialWrapper *material) |
Set the material to use. | |
virtual void | SetMixMode (uint mode) |
Set mix mode. Default implementation doesn't do anything. | |
virtual void | SetObjectBoundingBox (const csBox3 &bbox) |
See igeom/objmodel.h for specification. | |
void | SetSelfDestruct (csTicks t) |
Set selfdestruct mode on, and msec to live. | |
void | UnsetChangeAlpha () |
Stop change of alpha. | |
void | UnsetChangeColor () |
Stop change of color. | |
void | UnsetChangeRotation () |
Stop change of rotation. | |
void | UnsetChangeSize () |
Stop change of size. | |
void | UnSetSelfDestruct () |
system will no longer self destruct | |
virtual void | Update (csTicks passedTime) |
update the system. | |
void | UpdateBounds () |
update the bounding box based on particle positions | |
void | UpdateLighting (const csArray< iLightSectorInfluence * > &, iMovable *) |
update lighting info | |
virtual | ~csNewParticleSystem () |
destructor | |
Protected Member Functions | |
virtual void | Allocate (int newsize, int copysize) |
This function re-allocates the data arrays to 'newsize' and copies 'copysize' items from the old arrays. | |
void | SetupParticles (const csReversibleTransform &, csVector3 *vertices) |
Setup particles in the given tables right before they are drawn. | |
Protected Attributes | |
float | alpha_now |
float | alphapersecond |
float | Angle |
uniform rotation | |
float | anglepersecond |
csVector3 | Axis |
uniform axis alignment | |
csBox3 | Bounds |
bool | change_alpha |
Alpha change. | |
bool | change_color |
Color change. | |
bool | change_rotation |
Rotate particles, angle in radians. | |
bool | change_size |
Size change. | |
int | ClipPlane |
int | ClipPortal |
int | ClipZ |
csColor | Color |
uniform base color | |
csRef< iRenderBuffer > | color_buffer |
csColor | colorpersecond |
csColor * | colors |
iMeshObjectFactory * | Factory |
the mesh factory (should be an empty frame) | |
csWeakRef< iGraphics3D > | g3d |
csRef< iRenderBuffer > | index_buffer |
bool | initialized |
uint | lastDataUpdateFrame |
csRef< iLightManager > | light_mgr |
bool | Lighting |
csColor * | LitColors |
csRef< iMaterialWrapper > | Material |
uniform material | |
uint | MixMode |
mixing mode | |
csRef< iRenderBuffer > | normal_buffer |
int | ParticleCount |
number of particles in the system | |
int | ParticleFlags |
flags | |
csFrameDataHolder< PerFrameData > | perFrameHolder |
csVector3 * | PositionArray |
position values | |
csTicks | PrevTime |
previous time in the NextFrame() method | |
csRenderMeshHolder | rmHolder |
csVector2 | Scale |
uniform scaling | |
float | scalepersecond |
bool | self_destruct |
Self destruct and when. | |
int | StorageCount |
currently allocated amount of storage for particles | |
csRef< iRenderBuffer > | texel_buffer |
csVector2 * | texels |
csTicks | time_to_live |
int | TriangleCount |
csTriangle * | triangles |
int | VertexCount |
Classes | |
struct | PerFrameData |
Detailed Description
This is an abstract implementation of a particle system mesh object.It stores particle information (like position, rotation, scale, etc.) and knows how to draw the particles. It is abstract because it does not know how the particles move. This is done in the Update() method which must be implemented by subclasses. All features like scale and rotation can be disabled, enabled with global values and enabled with per-particle values.
Definition at line 70 of file particle.h.
Constructor & Destructor Documentation
|
constructor
|
|
destructor
|
Member Function Documentation
|
Add to the current color.
|
|
This function re-allocates the data arrays to 'newsize' and copies 'copysize' items from the old arrays. Subclasses can override this method to get notified (when they use their own arrays). |
|
free as much storage area as possible
|
|
Get the probable alpha of the particles.
Implements iParticleState. Definition at line 270 of file particle.h. |
|
see if change alpha is enabled, and get the value if so.
Implements iParticleState. Definition at line 277 of file particle.h. |
|
see if change color is enabled, and get a copy if so.
Implements iParticleState. Definition at line 254 of file particle.h. |
|
see if change rotation is enabled, and get the angle if so.
Implements iParticleState. Definition at line 291 of file particle.h. |
|
see if change size is enabled, and get the value if so.
Implements iParticleState. Definition at line 263 of file particle.h. |
|
Return the base color.
|
|
Returns 0 since there is no factory for a particle system.
Implements csMeshObject. |
|
Return whether this particle system applies lighting.
|
|
Return the current material.
Reimplemented from csMeshObject. |
|
Get mix mode.
Reimplemented from csMeshObject. Definition at line 295 of file particle.h. |
|
See igeom/objmodel.h for specification. The default implementation returns an infinite bounding box. Reimplemented from csMeshObject. Definition at line 227 of file particle.h. |
|
See imesh/object.h for specification. The default implementation does nothing and always returns 0. Reimplemented from csMeshObject. |
|
returns whether the system will self destruct
Definition at line 244 of file particle.h. |
|
if the system will self destruct, returns the time to live in msec.
Definition at line 246 of file particle.h. |
|
calls Update() with the amount of time passed since the previous call
Reimplemented from csMeshObject. |
|
Set the alpha of particles.
Implements iParticleState. Definition at line 267 of file particle.h. References CS_FX_SETALPHA. |
|
Change alpha of all particles, by factor per second.
Implements iParticleState. Definition at line 272 of file particle.h. |
|
Change color of all particles, by col per second.
Implements iParticleState. Definition at line 249 of file particle.h. |
|
Change rotation of all particles, by angle in radians per second.
Implements iParticleState. Definition at line 281 of file particle.h. References CS_PARTICLE_ROTATE. |
|
Change size of all particles, by factor per second.
Implements iParticleState. Definition at line 258 of file particle.h. |
|
Set the base color.
Reimplemented from csMeshObject. |
|
grow or shrink the storage area to the specified amount of particles
|
|
Set whether this particle system applies lighting.
|
|
Set the material to use.
Reimplemented from csMeshObject. |
|
Set mix mode. Default implementation doesn't do anything.
Reimplemented from csMeshObject. Definition at line 294 of file particle.h. |
|
See igeom/objmodel.h for specification. Overrides the default bounding box. Reimplemented from csMeshObject. Definition at line 232 of file particle.h. |
|
Set selfdestruct mode on, and msec to live.
Implements iParticleState. Definition at line 239 of file particle.h. |
|
Setup particles in the given tables right before they are drawn.
|
|
Stop change of alpha.
Implements iParticleState. Definition at line 275 of file particle.h. |
|
Stop change of color.
Implements iParticleState. Definition at line 252 of file particle.h. |
|
Stop change of rotation.
Implements iParticleState. Definition at line 289 of file particle.h. |
|
Stop change of size.
Implements iParticleState. Definition at line 261 of file particle.h. |
|
system will no longer self destruct
Implements iParticleState. Definition at line 242 of file particle.h. |
|
update the system.
|
|
update the bounding box based on particle positions
|
|
update lighting info
|
Member Data Documentation
|
uniform rotation
Definition at line 119 of file particle.h. |
|
uniform axis alignment
Definition at line 131 of file particle.h. |
|
Alpha change.
Definition at line 157 of file particle.h. |
|
Color change.
Definition at line 153 of file particle.h. |
|
Rotate particles, angle in radians.
Definition at line 159 of file particle.h. |
|
Size change.
Definition at line 155 of file particle.h. |
|
uniform base color
Definition at line 122 of file particle.h. |
|
the mesh factory (should be an empty frame)
Definition at line 76 of file particle.h. |
|
uniform material
Definition at line 128 of file particle.h. |
|
mixing mode
Definition at line 125 of file particle.h. |
|
number of particles in the system
Definition at line 110 of file particle.h. |
|
flags
Definition at line 107 of file particle.h. |
|
position values
Definition at line 113 of file particle.h. |
|
previous time in the NextFrame() method
Definition at line 134 of file particle.h. |
|
uniform scaling
Definition at line 116 of file particle.h. |
|
Self destruct and when.
Definition at line 149 of file particle.h. |
|
currently allocated amount of storage for particles
Definition at line 104 of file particle.h. |
The documentation for this class was generated from the following file:
- csplugincommon/particlesys/particle.h
Generated for Crystal Space by doxygen 1.4.6