Ejemplo n.º 1
0
 public ItemContactState(ItemCollision itemCollision, Collision collision, Contact contact, Int32 timesReacted)
 {
     Interactive  = itemCollision.Interactive;
     TimesReacted = timesReacted;
     Collision    = collision;
     Contact      = contact;
     Point        = contact.PointB;
     Radius       = Point - Interactive.Position;
     Normal       = contact.NormalAB;
     Velocity     = Interactive.GetVelocityAt(Radius);
     Approach     = -Vector3.Dot(Normal, Velocity);
     Momentum     = Interactive.GetForceAt(Radius);
     Weight       = -Vector3.Dot(Normal, Momentum);
     Orthonormal  = Normal.Orthonormal(Velocity);
 }
Ejemplo n.º 2
0
 public Single ComputeApproachVelocity()
 {
     return(-Vector3.Dot(Normal, Interactive.GetVelocityAt(Radius)));
 }