Beispiel #1
0
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
AngularImpulse WorldToLocalRotation( const VMatrix &localToWorld, const Vector &worldAxis, float rotation )
{
    // fix axes of rotation to match axes of vector
    Vector rot = worldAxis * rotation;
    // since the matrix maps local to world, do a transpose rotation to get world to local
    AngularImpulse ang = localToWorld.VMul3x3Transpose( rot );

    return ang;
}