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; }
public static void Validate(this AffineTransform a) { a.LinearTransform.Validate(); a.Translation.Validate(); }
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; }