PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/Main/src/Microsoft.Research.Visualization3D/Providers/Particles/ProjectileParticleSystem.cs

#
C# | 46 lines | 34 code | 12 blank | 0 comment | 0 complexity | 941cb3e94a753b05ee3680b6ec2ff461 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using SlimDX.Direct3D9;
 6using Microsoft.Research.Visualization3D.CameraUtilities;
 7
 8namespace Microsoft.Research.Visualization3D.Particles
 9{
10    class ProjectileParticleSystem : ParticleSystem
11    {
12        public ProjectileParticleSystem(DX3DHost host, Visualization3DDataSource dataSource) :
13            base(host, dataSource)
14        {
15
16        }
17        
18        protected override void InitializeSettings(ParticleSettings settings)
19        {
20            settings.TextureName = "smoke.png";
21
22            settings.MaxParticles = 1000;
23
24            settings.Duration = TimeSpan.FromSeconds(0.2);
25
26            settings.DurationRandomness = 1.5f;
27
28            settings.EmitterVelocitySensitivity = 0.5f;
29
30            settings.MinHorizontalVelocity = 0;
31            settings.MaxHorizontalVelocity = 1;
32
33            settings.MinVerticalVelocity = -1;
34            settings.MaxVerticalVelocity = 1;
35
36            settings.MinRotateSpeed = -4;
37            settings.MaxRotateSpeed = 4;
38
39            settings.MinStartSize = 3;
40            settings.MaxStartSize = 3;
41
42            settings.MinEndSize = 5;
43            settings.MaxEndSize = 5;
44        }
45    }
46}