technologies/Jitter/Dynamics/Contact.cs
/// <summary>
/// The points in wolrd space gets recalculated by transforming the
/// local coordinates. Also new penetration depth is estimated.
/// </summary>
The points in wolrd space gets recalculated by transforming the
local coordinates. Also new penetration depth is estimated.
The points in wolrd space gets recalculated by transforming the local coordinates . Also new penetration depth is estimated .
public void UpdatePosition()
        {
            if (!body1IsMassPoint)
            {
                JVector.Transform(ref realRelPos1, ref body1.orientation, out p1);
            }
            JVector.Add(ref p1, ref body1.position, out p1);
            if (!body2IsMassPoint)
            {
                JVector.Transform(ref realRelPos2, ref body2.orientation, out p2);
            }
            JVector.Add(ref p2, ref body2.position, out p2);
            JVector dist; JVector.Subtract(ref p1, ref p2, out dist);
            penetration = JVector.Dot(ref dist, ref normal);
        }
public void UpdatePosition ( ) { if ( ! body1IsMassPoint ) { JVector . Transform ( ref realRelPos1 , ref body1 . orientation , out p1 ) ; } JVector . Add ( ref p1 , ref body1 . position , out p1 ) ; if ( ! body2IsMassPoint ) { JVector . Transform ( ref realRelPos2 , ref body2 . orientation , out p2 ) ; } JVector . Add ( ref p2 , ref body2 . position , out p2 ) ; JVector dist ; JVector . Subtract ( ref p1 , ref p2 , out dist ) ; penetration = JVector . Dot ( ref dist , ref normal ) ; }
The points in wolrd space gets recalculated by transforming the
local coordinates.
The points in wolrd space gets recalculated by transforming the local coordinates .