Esempio n. 1
0
 public override void Integrate(MovementOutput movement, float duration)
 {
     this.Integrate(duration);
     this.velocity.x += movement.linear.x * duration;
     this.velocity.y += movement.linear.y * duration;
     this.velocity.z += movement.linear.z * duration;
     this.rotation   += movement.angular * duration;
 }
 public override void Integrate(MovementOutput movement, float duration)
 {
     this.Integrate(duration);
     this.velocity.x += movement.linear.x*duration;
     this.velocity.y += movement.linear.y*duration;
     this.velocity.z += movement.linear.z*duration;
     this.rotation += movement.angular*duration;
 }
 public virtual void Integrate(MovementOutput movement, float duration)
 {
     this.position.x +=  movement.linear.x*duration;
     this.position.y += movement.linear.y*duration;
     this.position.z += movement.linear.z*duration;
     this.orientation += movement.angular*duration;
     this.orientation = this.orientation%MathConstants.MATH_2PI;
 }
Esempio n. 4
0
 public virtual void Integrate(MovementOutput movement, float duration)
 {
     this.position.x  += movement.linear.x * duration;
     this.position.y  += movement.linear.y * duration;
     this.position.z  += movement.linear.z * duration;
     this.orientation += movement.angular * duration;
     this.orientation  = this.orientation % MathConstants.MATH_2PI;
 }
Esempio n. 5
0
        public void Integrate(MovementOutput steering, MovementOutput drag, float duration)
        {
            this.Integrate(duration);

            this.velocity.x *= (float)Math.Pow(drag.linear.x, duration);
            this.velocity.y *= (float)Math.Pow(drag.linear.y, duration);
            this.velocity.z *= (float)Math.Pow(drag.linear.z, duration);
            this.rotation   *= (float)Math.Pow(drag.angular, duration);

            this.velocity.x += steering.linear.x * duration;
            this.velocity.y += steering.linear.y * duration;
            this.velocity.z += steering.linear.z * duration;
            this.rotation   += steering.angular * duration;
        }
Esempio n. 6
0
        public void Integrate(MovementOutput steering, float drag, float duration)
        {
            this.Integrate(duration);

            var totalDrag = (float)Math.Pow(drag, duration);

            this.velocity *= totalDrag;
            this.rotation *= drag * drag;

            this.velocity.x += steering.linear.x * duration;
            this.velocity.y += steering.linear.y * duration;
            this.velocity.z += steering.linear.z * duration;
            this.rotation   += steering.angular * duration;
        }
        public void Integrate(MovementOutput steering, MovementOutput drag, float duration)
        {
            this.Integrate(duration);

            this.velocity.x *= (float)Math.Pow(drag.linear.x, duration);
            this.velocity.y *= (float) Math.Pow(drag.linear.y, duration);
            this.velocity.z *= (float) Math.Pow(drag.linear.z, duration);
            this.rotation *= (float)Math.Pow(drag.angular, duration);

            this.velocity.x += steering.linear.x * duration;
            this.velocity.y += steering.linear.y * duration;
            this.velocity.z += steering.linear.z * duration;
            this.rotation += steering.angular * duration;
        }
        public void Integrate(MovementOutput steering, float drag, float duration)
        {
            this.Integrate(duration);

            var totalDrag = (float)Math.Pow(drag, duration);

            this.velocity *= totalDrag;
            this.rotation *= drag*drag;

            this.velocity.x += steering.linear.x * duration;
            this.velocity.y += steering.linear.y * duration;
            this.velocity.z += steering.linear.z * duration;
            this.rotation += steering.angular * duration;
        }