예제 #1
0
        public Particle(Engine3D engine)
        {
            this.engine = engine;

            var r = new Random();

            for (int z = 0; z < 100; z++)
            {
                for (int x = 0; x < 100; x++)
                {
                    Status s = new Status
                    {
                        Offset   = new Vector3(x, (float)r.Next(30), z),
                        Speed    = new Vector3((float)r.Next(10), (float)r.Next(10), (float)r.Next(10)) * 0.0001f,
                        SpinAxis = Vector3.Normalize(new Vector3(0, 1, 0)),
                        Spin     = 1f / (float)r.Next(10),
                    };
                    statusArray.Add(s);
                }
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: yoo0721/HLSLTest
 public Form1()
 {
     InitializeComponent();
     engine = new Engine3D();
 }