Project290.Physics.Dynamics.Body.GetWorldVector C# (CSharp) Method

GetWorldVector() public method

Get the world coordinates of a vector given the local coordinates. Note that the vector only takes the rotation into account, not the position.
public GetWorldVector ( Vector2 &localVector ) : Vector2
localVector Vector2 A vector fixed in the body.
return Vector2
        public Vector2 GetWorldVector(ref Vector2 localVector)
        {
            return new Vector2(Xf.R.Col1.X*localVector.X + Xf.R.Col2.X*localVector.Y,
                               Xf.R.Col1.Y*localVector.X + Xf.R.Col2.Y*localVector.Y);
        }