World of Rigid Bodies (WoRB)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
WoRB::Collision Class Reference

Encalpsulates a collision event between two bodies; contains contact details. More...

#include <Collision.h>

Collaboration diagram for WoRB::Collision:

Private Member Functions

Collision response methods
void UpdateDerivedQuantities (double h)
 Updates the derived quantities from the state data.
void ImpulseTransfer (Quaternion V_jolt[2], Quaternion W_jolt[2])
 Applies the linear & angular impulses needed to resolve the collision.
void PositionProjection (Quaternion X_jolt[2], Quaternion Q_jolt[2], double relaxation)
 Applies the linear position jolt needed to resolve the collision.
Methods that calculates derived quantities
Quaternion GetImpulse ()
 Calculates the impulse needed to resolve the collision without friction.
Quaternion GetImpulse_IncludeFriction ()
 Calculates the impulse needed to resolve the collision in general case.
void ActivateInactiveBodies ()
 Activates (only) inactive bodies in a collision.
void FindOrthonormalBasisAtContactPoint ()
 Calculates an orthonormal basis for the contact point.
Quaternion GetRelativeVelocity (RigidBody *body, const Quaternion &relativePosition, double h)
 Gets the relative velocity for the point of contact on the given body.
double GetBouncingVelocity (double h)
 Calculates the bouncing velocity required to resolve the collision.
Miscellaneous methods
void Dump (unsigned id, double currentTime) const
 Displays the collision state variables on standard output.

Private Attributes

Derived quantities
QTensor ToWorld
 Contains a transformation matrix from body to world frame of reference.
Quaternion Velocity
 Holds the relative velocity v_A - v_B between bodies at the point of contact.
double BouncingVelocity
 Holds the required change in velocity for this contact to be resolved.
Quaternion RelativePosition [2]
 Holds the position of the contact point in world frame, relative to the center of each body.

Friends

class CollisionResolver

Collision state variables

RigidBodyBody_A
 Holds the first rigid body that is involved in the collision.
RigidBodyBody_B
 Holds the second rigid body that is involved in the collision.
Quaternion Position
 Holds the position of the contact in world frame of reference.
Quaternion Normal
 Holds the direction of the contact in world frame of reference.
double Penetration
 Holds the penetration depth at the point of contact.
double Restitution
 Holds the position projections coefficient for this collision.
double Friction
 Holds the friction coefficient for this collision.
bool WithScenery () const
 Returns true if the collision is with scenery.

Detailed Description

Encalpsulates a collision event between two bodies; contains contact details.

Definition at line 20 of file Collision.h.


Member Function Documentation

void WoRB::Collision::ActivateInactiveBodies ( ) [inline, private]

Activates (only) inactive bodies in a collision.

Collisions with the scenery (in case where body B is null) never cause a body to be activated.

Definition at line 156 of file Collision.h.

References WoRB::RigidBody::Activate(), Body_A, Body_B, and WoRB::RigidBody::IsActive.

Referenced by WoRB::CollisionResolver::ImpulseTransfers(), and WoRB::CollisionResolver::PositionProjections().

        {
            if ( Body_B && ( Body_A->IsActive ^ Body_B->IsActive ) )
            {
                if ( Body_A->IsActive ) {
                    Body_B->Activate ();
                }
                else {
                    Body_A->Activate ();
                }
            }
        }
void Collision::Dump ( unsigned  id,
double  currentTime 
) const [private]

Displays the collision state variables on standard output.

Definition at line 24 of file WoRB.cpp.

References BouncingVelocity, WoRB::Quaternion::Dump(), Friction, Normal, Penetration, Position, WoRB::Printf(), RelativePosition, Restitution, and Velocity.

Referenced by WoRB::CollisionResolver::Dump().

{
    Printf( "\nCollision %d: (COR = %g, mu = %g)\n", id, 
        Restitution, Friction );

    Printf( "%10s : %12.4lf\n", "t", currentTime );

    Position.Dump( "X" );
    Normal.Dump( "N" );

    Printf( "%10s : %12.4lf\n", "Pen", Penetration );

    Velocity.Dump( "V" );
    RelativePosition[0].Dump( "X rel A" );
    RelativePosition[1].Dump( "X rel B" );

    Printf( "%10s : %12.4lf\n", "B-Vel", BouncingVelocity );
}

Calculates an orthonormal basis for the contact point.

Definition at line 171 of file Collision.h.

References Normal, WoRB::Quaternion::Normalize(), WoRB::QTensor::SetColumnVectors(), ToWorld, WoRB::Quaternion::x, WoRB::Quaternion::y, and WoRB::Quaternion::z.

Referenced by UpdateDerivedQuantities().

        {
            Quaternion tangent_Y, tangent_Z;

            if ( fabs( Normal.x ) > fabs( Normal.y ) ) // Z-axis is nearer to the Y axis
            {
                double length = 1.0 / sqrt( Normal.z * Normal.z + Normal.x * Normal.x );

                // The new X-axis is at right angles to the world Y-axis
                tangent_Y.x =  Normal.z * length;
                tangent_Y.y =  0;
                tangent_Y.z = -Normal.x * length;

                // The new Y-axis is at right angles to the new X- and Z- axes
                tangent_Z.x =  Normal.y * tangent_Y.x;
                tangent_Z.y =  Normal.z * tangent_Y.x - Normal.x * tangent_Y.z;
                tangent_Z.z = -Normal.y * tangent_Y.x;
                tangent_Z.Normalize ();
            }
            else // Z-axis is nearer to the X axis
            {
                double length = 1.0 / sqrt( Normal.z * Normal.z + Normal.y * Normal.y );

                // The new X-axis is at right angles to the world X-axis
                tangent_Y.x =  0;
                tangent_Y.y = -Normal.z * length;
                tangent_Y.z =  Normal.y * length;

                // The new Y-axis is at right angles to the new X- and Z- axes
                tangent_Z.x =  Normal.y * tangent_Y.z - Normal.z * tangent_Y.y;
                tangent_Z.y = -Normal.x * tangent_Y.z;
                tangent_Z.z =  Normal.x * tangent_Y.y;
                tangent_Z.Normalize ();
            }

            /* Orthonormal basis is a 3x3 matrix, where each vector is a column. 
             * The X-direction is generated from the contact normal, and the Y and Z
             * directions are set so they are at right angles to it.
             */
            ToWorld.SetColumnVectors( Normal, tangent_Y, tangent_Z );
        }
double WoRB::Collision::GetBouncingVelocity ( double  h) [inline, private]

Calculates the bouncing velocity required to resolve the collision.

The bouncing velocity is -( 1 + COR ) * NormalVelocity.x.

Parameters:
hTime-step

Definition at line 247 of file Collision.h.

References Body_A, Body_B, WoRB::Quaternion::Dot(), WoRB::RigidBody::Force, WoRB::RigidBody::InverseMass, WoRB::RigidBody::IsActive, Normal, Restitution, Velocity, and WoRB::Quaternion::x.

Referenced by WoRB::CollisionResolver::ImpulseTransfers(), and UpdateDerivedQuantities().

        {
            // Calculate the normal component of the velocity induced by the force 
            // accumulated in the last time step.
            //
            double dV_fromForce_x = 0;
            if ( Body_A->IsActive )
            {
                Quaternion last_dV = Body_A->InverseMass * Body_A->Force * h;
                dV_fromForce_x += last_dV.Dot( Normal );
            }
            if ( Body_B && Body_B->IsActive )
            {
                Quaternion last_dV = Body_B->InverseMass * Body_B->Force * h;
                dV_fromForce_x -= last_dV.Dot( Normal );
            }

            // Limit the restitution in case when the velocity is very low.
            //
            double COR = fabs( Velocity.x - dV_fromForce_x ) < 0.25 ? 0.0 : Restitution;

            // The result is the bouncing-velocity, reduced for the velocity that was
            // induced by the force exerted in the last time-step.
            //
            return - ( 1 + COR ) * Velocity.x + COR * dV_fromForce_x;
        }

Calculates the impulse needed to resolve the collision without friction.

Definition at line 143 of file ImpulseMethod.cpp.

References Body_A, Body_B, BouncingVelocity, WoRB::Quaternion::Cross(), WoRB::RigidBody::InverseInertiaWorld, WoRB::RigidBody::InverseMass, Normal, and RelativePosition.

Referenced by ImpulseTransfer().

{
    // Build a vector that shows the change in velocity in world space for 
    // a unit impulse in the direction of the contact normal, then calculate the change 
    // in velocity in contact coordiantes, adding also the linear component of 
    // velocity jolt (body inverse mass 1/M).
    //
    // Equation (8-18) in 
    // Baraff, David - Physically Based Modeling, Rigid Body Simulation
    //
    //                 - ( 1 + COR ) * Velocity.x                     Bouncing velocity
    // j =  ------------------------------------------------------ = -------------------
    //       Sum( m^-1 + [ ( I_world^-1 • ( r × N ) ) x r ] • N )     Inv. reduced mass
    //

    // First, calculate:
    // iMass = Sum( m^-1 + ( ( I_world^-1 • ( r × N ) ) x r ) • N ) for each body
    //
    double invRedMass = 0;
    
    invRedMass += Body_A->InverseMass;
    invRedMass += ( Body_A->InverseInertiaWorld 
                    * ( RelativePosition[0].Cross( Normal ) )
                  ).Cross( RelativePosition[0] ).Dot( Normal );

    if ( Body_B ) {
        invRedMass += Body_B->InverseMass;
        invRedMass += ( Body_B->InverseInertiaWorld 
                        * ( RelativePosition[1].Cross( Normal ) )
                      ).Cross( RelativePosition[1] ).Dot( Normal );
    }

    // Finally, return the correct sized impulse in the contact frame of reference
    // along the contact normal (= X-component). 
    //
    return SpatialVector( BouncingVelocity / invRedMass, 0, 0 );
}

Calculates the impulse needed to resolve the collision in general case.

Definition at line 181 of file ImpulseMethod.cpp.

References Body_A, Body_B, BouncingVelocity, Friction, WoRB::QTensor::Inverse(), WoRB::RigidBody::InverseInertiaWorld, WoRB::RigidBody::InverseMass, WoRB::QTensor::m, RelativePosition, WoRB::QTensor::SetSkewSymmetric(), ToWorld, WoRB::QTensor::TransformInverse(), Velocity, WoRB::Quaternion::x, WoRB::QTensor::Components::xx, WoRB::QTensor::Components::xy, WoRB::QTensor::Components::xz, WoRB::Quaternion::y, WoRB::QTensor::Components::yy, WoRB::Quaternion::z, and WoRB::QTensor::Components::zz.

Referenced by ImpulseTransfer().

{
    // Build the matrix for converting between linear and angular quantities.
    // (Multiplying by a skew symmetrix matrix is equivalent to a cross product.)
    //
    QTensor crossR;
    crossR.SetSkewSymmetric( RelativePosition[0] );

    // Build the matrix to convert contact impulse to change in velocity
    // in world coordinates.
    //
    // dV_world = - ( r × I_world^-1 ) × r
    //
    QTensor delta_V_world = -( crossR * Body_A->InverseInertiaWorld * crossR );

    // Do the same for the second body
    //
    if ( Body_B )
    {
        // Calculate the velocity jolt matrix for body B and sum with the velocity
        // jolt for body A
        //
        // dV_world = - ( r_a × I_a_world^-1 ) × r_a - ( r_b × I_b_world^-1 ) × r_b
        //
        crossR.SetSkewSymmetric( RelativePosition[1] ); // cross product matrix
        delta_V_world += -( crossR * Body_B->InverseInertiaWorld * crossR );
    }

    // Do a change of basis to convert into contact coordinates.
    //
    QTensor delta_V_contact = ToWorld.TransformInverse( delta_V_world );

    // Include the linear effects of the inverse reduced mass m_ab^-1
    //
    // m_ab^-1 = m_a^-1 + m_b^-1
    //
    double inverseReducedMass = 
        Body_A->InverseMass + ( Body_B ? Body_B->InverseMass : 0.0 );

    delta_V_contact.m.xx += inverseReducedMass;
    delta_V_contact.m.yy += inverseReducedMass;
    delta_V_contact.m.zz += inverseReducedMass;

    if ( Friction == 0 ) {
        return Quaternion( 0, BouncingVelocity / delta_V_contact.m.xx, 0, 0 );
    }

    // For static friction we should just remove tangential components.
    //
    #if 0
        return Quaternion( 0,
            BouncingVelocity / delta_V_contact.m.xx, 
            -Velocity.y / delta_V_contact.m.yy * Friction, 
            -Velocity.z / delta_V_contact.m.zz * Friction
        );
    #endif

    // Find the target normal & tangential velocities to remove
    //
    Quaternion target_V( 0, BouncingVelocity, -Velocity.y, -Velocity.z );

    // Find the impulse to remove target velocities in contact frame of reference
    // (multiplying by dV^-1 we get the impulse needed per unit velocity)
    //
    // dV = m_a^-1 + m_b^-1 
    //    + ToContact • [                           <-- ToContact == ToWorld^-1
    //            - ( r_a × I_a_world^-1 ) × r_a
    //            - ( r_b × I_b_world^-1 ) × r_b
    //      ]
    //
    // J = dV^-1 • { -( 1 + COR ) * V.x, - V.y, - V.z }
    //
    Quaternion J = delta_V_contact.Inverse () * target_V;
    
    // Use dynamic friction in case of an exceeding friction.
    //
    double J_tangential = sqrt( J.y * J.y + J.z * J.z ); // tangential component

    if ( J_tangential > J.x * Friction ) // if excceding friction
    {
        // Normalize tangential components
        J.y /= J_tangential;
        J.z /= J_tangential;

        // Recalculate impuls
        double invm = delta_V_contact.m.xx  
                    + delta_V_contact.m.xy * Friction * J.y 
                    + delta_V_contact.m.xz * Friction * J.z;
        double j_normal = BouncingVelocity / invm;

        // Reduce friction for the given amount.
        J.x = j_normal;
        J.y *= Friction * j_normal;
        J.z *= Friction * j_normal;
    }

    return J;
}
Quaternion WoRB::Collision::GetRelativeVelocity ( RigidBody body,
const Quaternion relativePosition,
double  h 
) [inline, private]

Gets the relative velocity for the point of contact on the given body.

Parameters:
bodyThe pointer to the rigid body
relativePositionRelative position to the contact
hThe last time-step

Definition at line 215 of file Collision.h.

References WoRB::RigidBody::AngularVelocity, WoRB::Quaternion::Cross(), WoRB::RigidBody::Force, WoRB::RigidBody::InverseMass, ToWorld, WoRB::QTensor::TransformInverse(), WoRB::RigidBody::Velocity, and WoRB::Quaternion::x.

Referenced by UpdateDerivedQuantities().

        {
            // Calculate the velocity of the contact point in contact coordinates
            //
            Quaternion V_world = body->Velocity 
                               + body->AngularVelocity.Cross( relativePosition );

            Quaternion V = ToWorld.TransformInverse( V_world );

            // Calculate the ammount of velocity that is due to forces without reactions,
            // ignoring any component of acceleration in the contact normal direction 
            // (where only tangential/planar components are considered)
            //
            Quaternion dV_world = body->InverseMass * body->Force * h;

            Quaternion dV = ToWorld.TransformInverse( dV_world );

            dV.x = 0; // consider only tangential components

            // Add the tangential velocities (they will removed during the impulse
            // transfer, if there's enough friction).
            //
            return V + dV;
        }
void Collision::ImpulseTransfer ( Quaternion  V_jolt[2],
Quaternion  W_jolt[2] 
) [private]

Applies the linear & angular impulses needed to resolve the collision.

Parameters:
V_joltReturned applied velocity jolt
W_joltReturned applied angular velocity jolt

Definition at line 102 of file ImpulseMethod.cpp.

References WoRB::RigidBody::AngularMomentum, Body_A, Body_B, WoRB::Quaternion::Cross(), Friction, GetImpulse(), GetImpulse_IncludeFriction(), WoRB::RigidBody::InverseInertiaWorld, WoRB::RigidBody::InverseMass, WoRB::RigidBody::LinearMomentum, RelativePosition, and ToWorld.

Referenced by WoRB::CollisionResolver::ImpulseTransfers().

{
    // Get the collision impulse in contact frame of reference
    //
    Quaternion J_contact = Friction == 0
        ? GetImpulse ()  // Use the simplifed version in case of frictionless contacts
        : GetImpulse_IncludeFriction ();  // The fuull version including friction

    // Convert impulse to world space, then split it into linear and angular components
    //
    Quaternion J        = ToWorld( J_contact );
    Quaternion J_torque = RelativePosition[0].Cross( J );

    // Apply the jolts on the first body
    //
    Body_A->LinearMomentum  += J;
    Body_A->AngularMomentum += J_torque;

    V_jolt[0] = Body_A->InverseMass * J;
    W_jolt[0] = Body_A->InverseInertiaWorld * J_torque;

    // Apply the jolts on the second body, if it's not a scenery
    //
    if ( Body_B ) 
    {
        J_torque = RelativePosition[1].Cross( J );

        Body_B->LinearMomentum  -= J;
        Body_B->AngularMomentum -= J_torque;

        V_jolt[1] = -( Body_B->InverseMass * J );
        W_jolt[1] = -( Body_B->InverseInertiaWorld * J_torque );
    }

    // Note: The linear and the angular velocity will be derived later
    // in RigidBody::CalculateDerivedQuantities() method.
}
void Collision::PositionProjection ( Quaternion  X_jolt[2],
Quaternion  Q_jolt[2],
double  relaxation 
) [private]

Applies the linear position jolt needed to resolve the collision.

Parameters:
X_joltReturned applied position jolt
Q_joltReturned applied orientation jolt
relaxationPosition projections relaxation coefficient

Definition at line 88 of file PositionProjections.cpp.

References Body_A, WoRB::RigidBody::CalculateDerivedQuantities(), WoRB::Quaternion::Cross(), WoRB::Quaternion::Dot(), WoRB::Quaternion::ImNorm(), WoRB::RigidBody::InverseInertiaWorld, WoRB::RigidBody::InverseMass, Normal, WoRB::RigidBody::Orientation, Penetration, WoRB::RigidBody::Position, and RelativePosition.

Referenced by WoRB::CollisionResolver::PositionProjections().

{
    RigidBody** Body = &Body_A;

    // We need to work out the inertia of each object in the direction
    // of the contact normal, due to angular inertia only.
    //
    double inverseTotalInertia = 0;
    QTensor inverse_I_world[2];
    double inverseAngInertia[2];

    for ( unsigned i = 0; i < 2; ++i ) 
    {
        if ( ! Body[i] ) {
            continue;
        }

        inverse_I_world[i] = Body[i]->InverseInertiaWorld;

        // Calculate the angular component of total inertia:
        // angI = ( ( I_world^-1 • ( r × N ) ) × r ) • N
        //
        inverseAngInertia[i] = 
            ( inverse_I_world[i] * RelativePosition[i].Cross( Normal ) )
            .Cross( RelativePosition[i] )
            .Dot( Normal );

        // The total inertia is sum of its linear and angular components:
        // 1/m_tot = 1/m_linear + 1/m_angular;
        //
        inverseTotalInertia += Body[i]->InverseMass + inverseAngInertia[i];
    }

    // Loop through again calculating and applying the changes
    //
    for ( unsigned i = 0; i < 2; ++i ) 
    {
        if ( ! Body[i]) {
            continue;
        }

        // Calculate required linear (delta_X) and angular movements (delta_Q) 
        // in proportion to the two mass and angular inertias
        //
        double penetration = i == 0 ? Penetration : -Penetration;
        if ( 0.0 < relaxation && relaxation <= 1.0 ) {
            penetration *= ( 1 - relaxation );
        }
        double delta_X = penetration * ( Body[i]->InverseMass / inverseTotalInertia );
        double delta_Q = penetration * ( inverseAngInertia[i] / inverseTotalInertia );

        // Limit the angular jolt to avoid angular projections that are too great 
        // (case when mass is large and inertia tensor is small).
        {
            Quaternion angularProjection = 
                RelativePosition[i] - Normal * RelativePosition[i].Dot( Normal );

            const double Q_limit = 0.3;
            double max_Q = Q_limit * angularProjection.ImNorm ();

            if ( delta_Q < -max_Q )
            {
                delta_X = ( delta_X + delta_Q ) + max_Q;
                delta_Q = -max_Q;
            }
            else if ( delta_Q > max_Q )
            {
                delta_X = ( delta_X + delta_Q ) - max_Q;
                delta_Q = max_Q;
            }
        }

        // Calculate and apply the position jolt from the required linear movement
        // delta_X, which is a simple linear movement along the contact normal.
        //
        X_jolt[i] = Normal * delta_X;
        Body[i]->Position += X_jolt[i];

        // Calculate the required angular jolt to achieve angular movement delta_Q
        //
        if ( delta_Q == 0 )  // No angular movement = no orientation jolt
        {
            Q_jolt[i]= 0;
        }
        else // a bit more complicated orientation jolt
        { 
            //                  I_world^-1 • ( r × N ) 
            // Q_jolt = ---------------------------------------- * delta_Q
            //           ( ( I_world^-1 • ( r × N ) ) × r ) • N
            //
            Q_jolt[i] = inverse_I_world[i] 
                      * RelativePosition[i].Cross( Normal ) 
                      * ( delta_Q / inverseAngInertia[i] );

            Body[i]->Orientation += 0.5 * Q_jolt[i] * Body[i]->Orientation;

            // Now, normalize orientation and recalculate transformation matrix
            //
            Body[i]->CalculateDerivedQuantities (); 
        }
    }
}
void WoRB::Collision::UpdateDerivedQuantities ( double  h) [inline, private]

Updates the derived quantities from the state data.

Note:
Should be called before the collision response algorithm executes.
Parameters:
hTime-step

Definition at line 72 of file Collision.h.

References Body_A, Body_B, BouncingVelocity, FindOrthonormalBasisAtContactPoint(), GetBouncingVelocity(), GetRelativeVelocity(), Normal, Position, WoRB::RigidBody::Position, RelativePosition, and Velocity.

Referenced by WoRB::CollisionResolver::UpdateDerivedQuantities().

        {
            if ( ! Body_A ) // Reverse the contact and swap the bodies
            {
                Normal = -Normal; // Reverse the contact normal

                RigidBody* temp = Body_A; // Swap bodies
                Body_A = Body_B; 
                Body_B = temp;
            }

            // Calculate an set of axis at the point of contact.
            //
            FindOrthonormalBasisAtContactPoint ();

            // Find the relative position and velocity relative to each body
            //
            RelativePosition[0] = Position - Body_A->Position;
            Velocity = GetRelativeVelocity( Body_A, RelativePosition[0], h );

            if ( Body_B ) 
            {
                RelativePosition[1] = Position - Body_B->Position;
                Velocity -= GetRelativeVelocity( Body_B, RelativePosition[1], h );
            }

            // Calculate the desired change in velocity for the collision resolution
            //
            BouncingVelocity = GetBouncingVelocity( h );
        }
bool WoRB::Collision::WithScenery ( ) const [inline]

Returns true if the collision is with scenery.

Definition at line 59 of file Collision.h.

References Body_B.

        {
            return ! Body_B;
        }

Friends And Related Function Documentation

friend class CollisionResolver [friend]

Definition at line 22 of file Collision.h.


Field Documentation

Holds the second rigid body that is involved in the collision.

It is null in case of the collision with a scenery.

Definition at line 35 of file Collision.h.

Referenced by ActivateInactiveBodies(), GetBouncingVelocity(), GetImpulse(), GetImpulse_IncludeFriction(), ImpulseTransfer(), WoRB::CollisionResolver::RegisterNewContact(), UpdateDerivedQuantities(), and WithScenery().

Holds the required change in velocity for this contact to be resolved.

The basic expression is -( 1 + COR ) * Velocity.x

Definition at line 134 of file Collision.h.

Referenced by Dump(), WoRB::CollisionResolver::FindLargestBouncingVelocity(), GetImpulse(), GetImpulse_IncludeFriction(), WoRB::CollisionResolver::ImpulseTransfers(), and UpdateDerivedQuantities().

Holds the friction coefficient for this collision.

Definition at line 55 of file Collision.h.

Referenced by Dump(), GetImpulse_IncludeFriction(), ImpulseTransfer(), and WoRB::CollisionResolver::RegisterNewContact().

Holds the position of the contact in world frame of reference.

Definition at line 39 of file Collision.h.

Referenced by Dump(), WoRB::CollisionResolver::RegisterNewContact(), and UpdateDerivedQuantities().

Holds the position of the contact point in world frame, relative to the center of each body.

Definition at line 139 of file Collision.h.

Referenced by Dump(), GetImpulse(), GetImpulse_IncludeFriction(), ImpulseTransfer(), WoRB::CollisionResolver::ImpulseTransfers(), PositionProjection(), WoRB::CollisionResolver::PositionProjections(), and UpdateDerivedQuantities().

Holds the position projections coefficient for this collision.

Definition at line 51 of file Collision.h.

Referenced by Dump(), GetBouncingVelocity(), and WoRB::CollisionResolver::RegisterNewContact().

Contains a transformation matrix from body to world frame of reference.

Definition at line 125 of file Collision.h.

Referenced by FindOrthonormalBasisAtContactPoint(), GetImpulse_IncludeFriction(), GetRelativeVelocity(), ImpulseTransfer(), and WoRB::CollisionResolver::ImpulseTransfers().

Holds the relative velocity v_A - v_B between bodies at the point of contact.

Definition at line 129 of file Collision.h.

Referenced by Dump(), GetBouncingVelocity(), GetImpulse_IncludeFriction(), WoRB::CollisionResolver::ImpulseTransfers(), and UpdateDerivedQuantities().


The documentation for this class was generated from the following files: