C# 클래스 Myre.Graphics.Particles.ParticleSystem

A class which manages and updating and rendering of particles.
파일 보기 프로젝트 열기: TomGillen/Myre

공개 메소드들

메소드 설명
Draw ( RendererMetadata data ) : void
GrowCapacity ( int size ) : void

Increases the capacity of this system by the specified amount.

Initialise ( ParticleSystemDescription description ) : void

Initialises this ParticleSystem instance.

ParticleSystem ( GraphicsDevice device ) : System

Initializes a new instance of the ParticleSystem class.

Spawn ( Vector3 position, Vector3 velocity, float angularVelocity, float size, float lifetimeScale, Color startColour, Color endColour ) : void

Spawns a new particle.

Update ( float dt ) : void

비공개 메소드들

메소드 설명
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.

InitialiseBuffer ( ) : void
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.

SelectParticleType ( ) : void

메소드 상세

Draw() 공개 메소드

public Draw ( RendererMetadata data ) : void
data RendererMetadata
리턴 void

GrowCapacity() 공개 메소드

Increases the capacity of this system by the specified amount.
public GrowCapacity ( int size ) : void
size int The amount by which to increase the capacity.
리턴 void

Initialise() 공개 메소드

Initialises this ParticleSystem instance.
public Initialise ( ParticleSystemDescription description ) : void
description ParticleSystemDescription
리턴 void

ParticleSystem() 공개 메소드

Initializes a new instance of the ParticleSystem class.
public ParticleSystem ( GraphicsDevice device ) : System
device GraphicsDevice The device.
리턴 System

Spawn() 공개 메소드

Spawns a new particle.
public Spawn ( Vector3 position, Vector3 velocity, float angularVelocity, float size, float lifetimeScale, Color startColour, Color endColour ) : void
position Vector3 The position.
velocity Vector3 The velocity.
angularVelocity float The angular velocity.
size float The size.
lifetimeScale float The lifetime scale. This should be between 0 and 1.
startColour Color The start colour.
endColour Color The end colour.
리턴 void

Update() 공개 메소드

public Update ( float dt ) : void
dt float
리턴 void