A transformation composed of a linear transformation and a translation.
示例#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;
 }
示例#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;
 }
示例#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);
 }
示例#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;
 }
示例#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;
 }