Namespace: DeltaEngine.Rendering3D
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering3D.Particles.Tests.ParticleSystemTests
2 unit tests call DeltaEngine.Rendering3D.Entity3D.Set(System.Object)
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- component
- Type: System Object
Remarks
Examples
[Test, CloseAfterFirstFrame] public void AttachingEmitterSetsPositionAndRotation() { particleSystem.Position = Vector3D.UnitY; particleSystem.Orientation = Quaternion.FromAxisAngle(Vector3D.UnitZ, 45); var emitter = CreateAndAttachEmitter(Vector3D.UnitX); particleSystem.FireBurstOfAllEmitters(); particleSystem.FireBurstAtRelativePosition(Vector3D.One); particleSystem.FireBurstAtRelativePositionAndRotation(Vector3D.One, 0.5f); Assert.AreEqual(particleSystem.Position, emitter.Position); Assert.AreEqual(particleSystem.Orientation, emitter.Rotation); Assert.IsTrue(particleSystem.IsActive); particleSystem.IsActive = false; Assert.IsFalse(particleSystem.IsActive); }
[Test, CloseAfterFirstFrame] public void SettingPositionAndRotationOfSystemAlsoSetsForEmitters() { particleSystem.Position = Vector3D.One; var emitter = CreateAndAttachEmitter(Vector3D.Zero); particleSystem.Position = Vector3D.UnitY; particleSystem.Orientation = Quaternion.FromAxisAngle(Vector3D.UnitZ, 50); Assert.AreEqual(particleSystem.Position, emitter.Position); Assert.AreEqual(particleSystem.Orientation, emitter.Rotation); }
See Also