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.Particle2DEmitterTests
7 unit tests call DeltaEngine.Rendering3D.Particles.Particle.Rotation
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: SingleRemarks
Examples
[Test] public void RotateEmitterOnClick() { var particleEmitter = new ParticleEmitter(CreateData(100, 0.1f, 1.0f), new Vector3D(0.5f, 0.5f, 0.0f)); bool rotated = false; new Command(Command.Click, () => {//ncrunch: no coverage start particleEmitter.Rotation = rotated ? Quaternion.Identity : Quaternion.FromAxisAngle(Vector3D.UnitZ, 45); rotated = !rotated; }); //ncrunch: no coverage end }
[Test] public void TrackRotationOfEmitter() { var data = CreateData(100, 0.2f, 1.0f); data.DoParticlesTrackEmitter = true; var particleEmitter = new ParticleEmitter(data, new Vector3D(0.5f, 0.5f, 0.0f)); new Command(Command.Click, () => particleEmitter.Rotation *= Quaternion.FromAxisAngle(Vector3D.UnitZ, 20.0f)); //ncrunch: no coverage }
[Test] public void TrackRotationOfEmitterVisually() { var emitterData = CreateTrackingParticleData(); emitterData.SpawnInterval = 0; emitterData.BillboardMode = BillboardMode.Ground; emitterData.LifeTime = 1.0f; var emitter = new ParticleEmitter(emitterData, Vector3D.Zero); new Command(Command.Click, () => emitter.Rotation *= Quaternion.FromAxisAngle(Vector3D.UnitY, 30.0f)); //ncrunch: no coverage new Command(Command.MiddleClick, () => emitter.Spawn(1)); }
See Also