C# Класс Myre.Graphics.Translucency.Particles.ParticleSystem

A class which manages and updating and rendering of particles.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddNewParticlesToVertexBuffer void
CalculateWorldView void
FreeRetiredParticles void
IGeometry void
IGeometry void
InitialiseBuffer void
RetireActiveParticles void
SelectParticleType void

Открытые методы

Метод Описание
Draw ( NamedBoxCollection 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.Diagnostics

Initializes a new instance of the ParticleSystem class.

Spawn ( System.Numerics.Vector3 position, System.Numerics.Vector3 velocity, float angularVelocity, float size, float lifetimeScale, Microsoft.Xna.Framework.Color startColour, Microsoft.Xna.Framework.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.

CalculateWorldView ( Matrix4x4 &view ) : void
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.

IGeometry ( Myre.Graphics.Materials.Material material, Renderer renderer ) : void
IGeometry ( string phase, Renderer renderer ) : void
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 ( NamedBoxCollection data ) : void
data NamedBoxCollection
Результат 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.Diagnostics
device GraphicsDevice The device.
Результат System.Diagnostics

Spawn() публичный Метод

Spawns a new particle.
public Spawn ( System.Numerics.Vector3 position, System.Numerics.Vector3 velocity, float angularVelocity, float size, float lifetimeScale, Microsoft.Xna.Framework.Color startColour, Microsoft.Xna.Framework.Color endColour ) : void
position System.Numerics.Vector3 The position.
velocity System.Numerics.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 Microsoft.Xna.Framework.Color The start colour.
endColour Microsoft.Xna.Framework.Color The end colour.
Результат void

Update() публичный Метод

public Update ( float dt ) : void
dt float
Результат void