C# Class Reactor.PointParticleSystem

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Datei anzeigen Open project: reisergames/reactor-v1 Class Usage Examples

Public Methods

Method Description
AddParticle ( Vector3 position, Vector3 velocity ) : void

Adds a new particle to the system.

Draw ( GameTime gameTime ) : void

Draws the particle system.

Initialize ( ) : void

Initializes the component.

InitializeSettings ( PointParticleSettings Settings ) : void

Derived particle system classes should override this method and use it to initalize their tweakable settings.

LoadContent ( ) : void

Loads graphics for the particle system.

PointParticleSystem ( Microsoft.Xna.Framework.Game game ) : System

Constructor.

Scale ( float size ) : void
SetCamera ( Matrix view, Matrix projection ) : void

Sets the camera view and projection matrices that will be used to draw this particle system.

Update ( GameTime gameTime ) : void

Updates the particle system.

Private Methods

Method Description
AddNewParticlesToVertexBuffer ( ) : void

Helper for uploading new particles from our managed array to the GPU vertex buffer.

FreeRetiredParticles ( ) : void

Helper for checking when retired particles have been kept around long enough that we can be sure the GPU is no longer using them. It moves old particles from the retired area of the queue to the free section.

LoadParticleEffect ( ) : void

Helper for loading and initializing the particle effect.

RetireActiveParticles ( ) : void

Helper for checking when active particles have reached the end of their life. It moves old particles from the active area of the queue to the retired section.

Method Details

AddParticle() public method

Adds a new particle to the system.
public AddParticle ( Vector3 position, Vector3 velocity ) : void
position Vector3
velocity Vector3
return void

Draw() public method

Draws the particle system.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Initialize() public method

Initializes the component.
public Initialize ( ) : void
return void

InitializeSettings() public method

Derived particle system classes should override this method and use it to initalize their tweakable settings.
public InitializeSettings ( PointParticleSettings Settings ) : void
Settings PointParticleSettings
return void

LoadContent() public method

Loads graphics for the particle system.
public LoadContent ( ) : void
return void

PointParticleSystem() public method

Constructor.
public PointParticleSystem ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
return System

Scale() public method

public Scale ( float size ) : void
size float
return void

SetCamera() public method

Sets the camera view and projection matrices that will be used to draw this particle system.
public SetCamera ( Matrix view, Matrix projection ) : void
view Matrix
projection Matrix
return void

Update() public method

Updates the particle system.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void