Namespace: DeltaEngine.Rendering3D.Particles
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering3D.Particles.Tests.Particle3DEmitterTests
2 unit tests call DeltaEngine.Rendering3D.Particles.Particle.Acceleration
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Vector3DRemarks
Examples
[Test] public void SmokeAndWind() { window.BackgroundColor = new Color(40, 64, 20); var defaultForce = new RangeGraph<Vector3D>(Vector3D.Zero); var windForce = new RangeGraph<Vector3D>(new Vector3D(-0.5f, -0.01f, 0.0f), new Vector3D(-1.0f, 0.01f, 0.0f)); var emitterData = GetEmitterData(spark, 256, 2.0f); emitterData.Color = new RangeGraph<Color>(Color.White, Color.Transparent(Color.DarkGray)); emitterData.Size = new RangeGraph<Size>(new Size(0.05f), new Size(0.2f)); emitterData.Acceleration = defaultForce; emitterData.StartVelocity = new RangeGraph<Vector3D>(new Vector3D(0.0f, 0.0f, 0.35f), new Vector3D(0.1f, 0.1f, 0.1f)); var emitter = new ParticleEmitter(emitterData, Vector3D.Zero); new Command(() => emitter.EmitterData.Acceleration = windForce).Add(new KeyTrigger(Key.Space)); new Command(() => emitter.EmitterData.Acceleration = defaultForce).Add( new KeyTrigger(Key.Space, State.Releasing)); }
[Test, CloseAfterFirstFrame] public void SetForce() { var emitter = new ParticleEmitter(GetEmitterData(spark, 512), Vector3D.Zero); var force = new RangeGraph<Vector3D>(Vector3D.One); emitter.EmitterData.Acceleration = force; Assert.AreEqual(force, emitter.EmitterData.Acceleration); }
See Also