Exemple #1
0
 /// <summary>
 /// Creates a rigid transformation from a matrix <paramref name="m"/>.
 /// </summary>
 public __e3t__(M4__s4f__ m, __ft__ epsilon = __eps__)
     : this(((M3__s3f__)m) / m.M33, m.C3.XYZ / m.M33, epsilon)
 {
     if (!(m.M30.IsTiny(epsilon) && m.M31.IsTiny(epsilon) && m.M32.IsTiny(epsilon)))
     {
         throw new ArgumentException("Matrix contains perspective components.");
     }
     if (m.M33.IsTiny(epsilon))
     {
         throw new ArgumentException("Matrix is not homogeneous.");
     }
 }
 /// <summary>
 /// Creates a rigid transformation from a matrix <paramref name="m"/>.
 /// </summary>
 public __e3t__(M4__s4f__ m, __ft__ epsilon = __eps__)
     : this(((M3__s3f__)m) / m.M33, m.C3.XYZ / m.M33, epsilon)
 {
     Requires.That(m.M30.IsTiny(epsilon) && m.M31.IsTiny(epsilon) && m.M32.IsTiny(epsilon), "Matrix contains perspective components.");
     Requires.That(!m.M33.IsTiny(epsilon), "Matrix is not homogeneous.");
 }