Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering3D Entity3D
DeltaEngine.Rendering3D HierarchyEntity3D
DeltaEngine.Rendering3D.Particles ParticleSystem
Namespace: DeltaEngine.Rendering3D.Particles
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The ParticleSystem type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ParticleSystem | Initializes a new instance of the ParticleSystem class | |
ParticleSystem(ParticleSystemData) | Initializes a new instance of the ParticleSystem class |
Methods
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
lastOrientation | (Inherited from Entity3D.) | |
lastPosition | (Inherited from Entity3D.) | |
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
AttachedEmitters | ||
Children | (Inherited from HierarchyEntity3D.) | |
IsActive | (Overrides HierarchyEntity3D IsActive.) | |
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
NumberOfComponents | (Inherited from Entity.) | |
Orientation | (Inherited from Entity3D.) | |
Parent | (Inherited from HierarchyEntity3D.) | |
Position | (Inherited from Entity3D.) | |
RelativeOrientation | (Inherited from HierarchyEntity3D.) | |
RelativePosition | (Inherited from HierarchyEntity3D.) | |
RenderLayer | (Inherited from DrawableEntity.) | |
Scale | (Inherited from Entity3D.) | |
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void NewSystemHasListInitialized() { Assert.IsNotNull(particleSystem.AttachedEmitters); }
[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 DisposeEmitterDeactivates() { var emitterAlpha = CreateAndAttachEmitter(Vector3D.Zero); var emitterBeta = CreateAndAttachEmitter(Vector3D.UnitY); particleSystem.DisposeEmitter(1); particleSystem.DisposeEmitter(emitterAlpha); particleSystem.DisposeEmitter(emitterAlpha); Assert.IsFalse(emitterAlpha.IsActive); Assert.IsFalse(emitterBeta.IsActive); Assert.AreEqual(0, particleSystem.AttachedEmitters.Count); }
See Also