Example #1
0
        public Vector2 InverseTransformDirection(Vector2 vector)
        {
#if USE_MATRIX_FOR_ROTATION
            return(Math.MulT(rotation, vector));
#else
            return(Quaternion.Inverse(rotation).Xyz().ToVector2() * vector);
#endif
        }
Example #2
0
        public static Vector2 MulT(Transform T, Vector2 v)
        {
#if USE_MATRIX_FOR_ROTATION
            return(Math.MulT(T.R, v - T.position));
#else
            return(T.InverseTransformDirection(v - T.position));
#endif
        }
Example #3
0
 public Vector2 InverseTransformPoint(Vector2 vector)
 {
     return(Math.MulT(R, vector - position));
 }
Example #4
0
 public static Vec2 MulT(XForm T, Vec2 v)
 {
     return(Math.MulT(T.R, v - T.Position));
 }
Example #5
0
 public Vector2 InverseTransformDirection(Vector2 vector)
 {
     return(Math.MulT(R, vector));
 }