天天看點

OSG 粒子系統 類圖

參考: http://blog.csdn.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,實作對粒子系統發射及發射後效果的控制. 

osg