OSG 粒子系统 类图

参考: http://blog.****.net/snail_hunan/article/details/47263837


OSG 粒子系统 类图


类列表:


ParticleSystem:
The heart of this class library; its purpose is to hold a set of particles and manage particle creation, update, rendering and destruction. 
You can add this drawable to any Geode as you usually do with other Drawable classes. Each instance of ParticleSystem is a 
separate set of particles; it provides the interface for creating particles and iterating through them (see the Emitter and Program classes). 


ConnectedParticleSystem: (拖尾效果)
ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects like missile trails, where the 
individual particles are rendered as single ribbon.


ParticleSystemUpdater:
A useful node class for updating particle systems automatically. 
When a ParticleSystemUpdater is traversed by a cull visitor, it calls the update() method on the specified particle 
systems. You should place this updater AFTER other nodes like emitters and programs. 


ParticleProcessor:
A common base interface for those classes which need to do something on particles. 
Such classes are, for example, Emitter (particle generation) and Program (particle animation). This class holds some
properties, like a reference frame and a reference to a ParticleSystem; descendant classes should process the particles 
taking into account the reference frame, computing the right transformations when needed. 


Emitter:
An abstract base class for particle emitters. 
Descendant classes must override the emitParticles() method to generate new particles by calling the 
ParticleSystem::createParticle() method on the particle system associated to the emitter. 


ModularEmitter:
An emitter class that holds three objects to control the creation of particles. 
These objects are a counter, a placer and a shooter. The counter controls the number of particles to be emitted at each 
frame; the placer must initialize the particle's position vector, while the shooter initializes its velocity vector. You 
can use the predefined counter/placer/shooter classes, or you can create your own. 


Program:
An abstract ParticleProcessor descendant for modifying particles "on the fly" during the cull traversal. 
Descendants of this class must implement the execute() method, which should iterate through all particles in the linked 
particle system and modify them somehow (usually updating their velocity vector). 


FluidProgram:
A program class for performing operations on particles using a sequence of operators. 
To use a FluidProgram you have to create some Operator objects and add them to the program. All operators will be applied 
to each particle in the same order they've been added to the program. 


ModularProgram:
A program class for performing operations on particles using a sequence of operators. 
To use a ModularProgram you have to create some Operator objects and add them to the program. All operators will be applied 
to each particle in the same order they've been added to the program. 


Operator:
An abstract base class used by ModularProgram to perform operations on particles before they are updated. 
To implement a new operator, derive from this class and override the operate() method. You should also override the 
beginOperate() method to query the calling program for the reference frame used, and initialize the right transformations 
if needed. 


ParticleEffect:
粒子系统效果, 通过发射器Emmitor,影响器Program,实现对粒子系统发射及发射后效果的控制.