예제 #1
0
        private void Update(float timeInSeconds)
        {
            //Friction generates heat, so heavier and faster means more heat..
            double friction = _centre.AngularVelocity.Z * _centre.Mass * _frictionFromSlider;

            double energyToRemove = friction * 0.1;//random scaling number... friction is just a coefficient anyway so this can be whatever suits...

            //now remove that heat energy from the sytem
            _centre.AddRotationalKineticEnergy(new Vector(0, 0, -energyToRemove));

            _centre.Move(timeInSeconds);

            _wheel.Rotation = (float)_centre.RotationAsDegreesPerSecond().Z;

            UpdateLabels();
        }