UpdateMesh() public method

public UpdateMesh ( ) : void
return void
Exemplo n.º 1
0
        public override void simulate(double time)
        {
            base.simulate(time);


            ballConstrain.Center.z = -Math.Sin(DateTime.Now.Ticks / 6000000.0) * 110; //+ 40;
            ballConstrain.Center.x = Math.Cos(DateTime.Now.Ticks / 4000000.0) * 110;
            ballConstrain.UpdateMesh();

            boxConstrain.Center.z = -Math.Cos(DateTime.Now.Ticks / 6000000.0) * 110; //+ 40;
            boxConstrain.Center.x = Math.Sin(DateTime.Now.Ticks / 4000000.0) * 110;
            boxConstrain.UpdateMesh();
        }
Exemplo n.º 2
0
        public override void simulate(double time)
        {
            if (Geometry == null)
            {
                return;
            }



            //ballConstrain.ApplyConstrained(particles);
            // boxConstrain.Center.z = -Math.Cos(DateTime.Now.Ticks / 90000000.0) * 50; //+ 40;
            // boxConstrain.Center.x = Math.Sin(DateTime.Now.Ticks / 90000000.0) * 50;
            //boxConstrain.UpdateMesh();
            //boxConstrain.ApplyConstrained(particles);

            base.simulate(time);


            //Math.Random()
            ballConstrain.Center.z = -Math.Sin(DateTime.Now.Ticks / 9000000.0) * 200; //+ 40;
            ballConstrain.Center.x = Math.Cos(DateTime.Now.Ticks / 9000000.0) * 300;
            ballConstrain.UpdateMesh();


            if (particles[0].position.y < -800)
            {
                Reset();
                double min = 0.7;
                double max = 1.3;

                double factor = min + Math.Random() * (max - min);

                ballConstrain.ChangeRadius(ballConstrain.Radius * factor);
                ballConstrain.UpdateMesh();
            }
        }