Exemplo n.º 1
0
 /// <summary>
 /// Initialize using a position vector and a rotation matrix.
 /// </summary>
 /// <param name="position">The position.</param>
 /// <param name="rotation">The r.</param>
 public Transform(ref Vector2 position, ref Rot rotation)
 {
     p = position;
     q = rotation;
 }
Exemplo n.º 2
0
 public static Vector2 MulT(ref Rot rot, Vector2 axis)
 {
     return(MulT(rot, axis));
 }
Exemplo n.º 3
0
 public static FVector2 Mul(ref Rot rot, FVector2 axis)
 {
     return(Mul(rot, axis));
 }
Exemplo n.º 4
0
 /// Inverse rotate a vector
 public static Vector2 MulT(Rot q, Vector2 v)
 {
     return(new Vector2(q.c * v.X + q.s * v.Y, -q.s * v.X + q.c * v.Y));
 }
Exemplo n.º 5
0
 /// Rotate a vector
 public static FVector2 Mul(Rot q, FVector2 v)
 {
     return(new FVector2(q.c * v.X - q.s * v.Y, q.s * v.X + q.c * v.Y));
 }