Particle StructureDelta Engine Documentation

Namespace: DeltaEngine.Rendering3D.Particles
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public struct Particle : Lerp<Particle>, 
	Lerp

The Particle type exposes the following members.

Methods

  NameDescription
Public methodGetVertices
Public methodLerp
Public methodSetStartVelocityRandomizedFromRange
Public methodUpdateEscapingParticleIfStillActive
Public methodUpdateIfStillActive
Public methodUpdateRoundingParticleIfStillActive
Top
Properties

  NameDescription
Public propertyAcceleration
Public propertyColor
Public propertyCurrentFrame
Public propertyCurrentMovement
Public propertyCurrentUV
Public propertyElapsedTime
Public propertyIsActive
Public propertyMaterial
Public propertyPosition
Public propertyRotation
Public propertySize
Top
Remarks

Tests: DeltaEngine.Rendering3D.Particles.Tests.Particle2DEmitterTests
Examples

69 unit tests call DeltaEngine.Rendering3D.Particles.Particle
[Test, Category("Slow")]
public void Render1000Particles()
{
    CreateDataAndEmitter(1000, 0.01f, 10);
    emitter.Position = new Vector2D(0.5f, 0.4f);
    Rectangle fpsDrawArea = Rectangle.FromCenter(0.5f, 0.25f, 0.2f, 0.2f);
    new FpsDisplay(emitter, fpsDrawArea);
} //ncrunch: no coverage end
[Test]
public void Render2000Particles()
{
    var emitters = new[]
    {
        new ParticleEmitter(CreateData(1000, 0.01f, 10), new Vector2D(0.3f, 0.5f)),
        new ParticleEmitter(CreateData(1000, 0.01f, 10), new Vector2D(0.7f, 0.5f))
    };
    new FpsDisplay(emitters, Rectangle.FromCenter(0.5f, 0.25f, 0.2f, 0.2f));
}
[Test]
public void ParticlesAreEmittedAtMousePosition()
{
    CreateDataAndEmitter(1024, 0.01f, 5);
    new Command(position => emitter.Position = position).Add(new MouseMovementTrigger());
}
See Also