Particle Position Property Delta 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 Vector3D Position { get; set; }

Property Value

Type: Vector3D
Remarks

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

11 unit tests call DeltaEngine.Rendering3D.Particles.Particle.Position
[Test]
public void ParticlesAreEmittedAtMousePosition()
{
    CreateDataAndEmitter(1024, 0.01f, 5);
    new Command(position => emitter.Position = position).Add(new MouseMovementTrigger());
}
[Test, CloseAfterFirstFrame]
public void ParticlesUpdatingPosition()
{
    Randomizer.Use(new FixedRandom());
    CreateDataAndEmitter();
    AdvanceTimeAndUpdateEntities(0.1f);
    Assert.AreEqual(new Vector3D(0.4f, 0.4f, 0), emitter.particles[0].Position);
}
[Test, CloseAfterFirstFrame]
public void ParticlesTrackingEmitterUpdatingPosition()
{
    Randomizer.Use(new FixedRandom());
    CreateDataAndEmitter();
    emitterData.DoParticlesTrackEmitter = true;
    AdvanceTimeAndUpdateEntities(0.1f);
    emitter.Position = Vector2D.One;
    AdvanceTimeAndUpdateEntities(0.1f);
    Assert.AreEqual(new Vector3D(0.9f, 0.9f, 0), emitter.particles[0].Position);
}
See Also