A transformation composed of a linear transformation and a translation.
Esempio n. 1
0
 public static void InvertRigid(ref AffineTransform transform, out AffineTransform inverse)
 {
     Matrix3x3.Transpose(ref transform.LinearTransform, out inverse.LinearTransform);
     Matrix3x3.Transform(ref transform.Translation, ref inverse.LinearTransform, out inverse.Translation);
     inverse.Translation = -inverse.Translation;
 }
Esempio n. 2
0
 public static void Transform(ref Vector3 position, ref AffineTransform transform, out Vector3 transformed)
 {
     Matrix3x3.Transform(ref position, ref transform.LinearTransform, out transformed);
     transformed += transform.Translation;
 }
Esempio n. 3
0
 public static void Multiply(ref AffineTransform a, ref AffineTransform b, out AffineTransform transform)
 {
     Vector3 translation;
     Matrix3x3.Transform(ref a.Translation, ref b.LinearTransform, out translation);
     transform.Translation = b.Translation + translation;
     Matrix3x3.Multiply(ref a.LinearTransform, ref b.LinearTransform, out transform.LinearTransform);
 }
Esempio n. 4
0
 public static void Transform(ref Vector3 position, ref AffineTransform transform, out Vector3 transformed)
 {
     Matrix3x3.Transform(ref position, ref transform.LinearTransform, out transformed);
     transformed += transform.Translation;
 }
Esempio n. 5
0
 public static void InvertRigid(ref AffineTransform transform, out AffineTransform inverse)
 {
     Matrix3x3.Transpose(ref transform.LinearTransform, out inverse.LinearTransform);
     Matrix3x3.Transform(ref transform.Translation, ref inverse.LinearTransform, out inverse.Translation);
     inverse.Translation = -inverse.Translation;
 }