public __type__(__type__ s)
 {
     Scale     = s.Scale;
     Euclidean = s.Euclidean;
 }
 public static bool ApproximateEquals(this __type__ t0, __type__ t1, __ftype__ tol)
 {
     return(t0.Scale.ApproximateEquals(t1.Scale, tol) && t0.Euclidean.ApproximateEquals(t1.Euclidean, tol));
 }
 public __type__(__ftype__ scale, __rotnt__ rotation, __vnt__ translation)
 {
     Scale     = scale;
     Euclidean = new __euclideannt__(rotation, translation);
 }
 public __type__(__ftype__ scale, __rotnt__ rotation, /*# nfields.ForEach(f => { */ __ftype__ t__f__ /*# }, comma);*/)
 {
     Scale     = scale;
     Euclidean = new __euclideannt__(rotation, /*# nfields.ForEach(f => { */ t__f__ /*# }, comma);*/);
 }
Пример #5
0
        /// <summary>
        /// Returns if the matrix is orthonormal (i.e. M * M^t == I)
        /// </summary>
        public bool IsOrthonormal(__ftype__ epsilon)
        {
            var i = this * this.Transposed;

            return(i.IsIdentity(epsilon));
        }
Пример #6
0
 public __type__(__type__ r)
 {
     Angle = r.Angle;
 }
Пример #7
0
 public static bool ApproximateEquals(this __type__ a0, __type__ a1, __ftype__ tolerance)
 {
     return(ApproximateEquals(a0.Linear, a1.Linear, tolerance) && ApproximateEquals(a0.Trans, a1.Trans, tolerance));
 }
Пример #8
0
 /// <summary>
 /// Returns if all entries in the matrix a are approximately equal to the respective entries in matrix b.
 /// </summary>
 public static bool ApproximatelyEquals(__nmtype__ a, __nmtype__ b, __ftype__ epsilon)
 {
     return(DistanceMax(a, b) <= epsilon); //Inefficient implementation, no early exit of comparisons.
 }
Пример #9
0
 public __type__(__ftype__ w, __ftype__ x, __ftype__ y, __ftype__ z)
 {
     W = w;
     X = x; Y = y; Z = z;
     __assertNorm__;
 }
Пример #10
0
 public __type__(__ftype__ w, __v3t__ v)
 {
     W = w;
     X = v.X; Y = v.Y; Z = v.Z;
     __assertNorm__;
 }
Пример #11
0
 public __type__(__ftype__[] a, int start)
 {
     W = a[start];
     X = a[start + 1]; Y = a[start + 2]; Z = a[start + 3];
     __assertNorm__;
 }
Пример #12
0
 public __type__(__ftype__[] a)
 {
     W = a[0];
     X = a[1]; Y = a[2]; Z = a[3];
     __assertNorm__;
 }
Пример #13
0
 public static bool ApproximateEquals(this __type__ r0, __type__ r1, __ftype__ tolerance)
 {
     return(Rot.Distance(r0, r1) <= tolerance);
 }
 public static bool ApproximateEquals(this __type__ t0, __type__ t1, __ftype__ angleTol, __ftype__ posTol, __ftype__ scaleTol)
 {
     return(t0.Scale.ApproximateEquals(t1.Scale, scaleTol) && t0.Euclidean.ApproximateEquals(t1.Euclidean, angleTol, posTol));
 }
Пример #15
0
 public __type__(__mnnt__ linear, /*# nfields.ForEach(f => { */ __ftype__ t__f__ /*# }, comma); */)
 {
     Debug.Assert(linear.Invertible);
     Linear = linear;
     Trans  = new __vnt__(/*# nfields.ForEach(f => { */ t__f__ /*# }, comma); */);
 }
 public __type__(__ftype__ scale)
 {
     Scale     = scale;
     Euclidean = __euclideannt__.Identity;
 }
 public __type__(__euclideannt__ euclideanTransformation)
 {
     Scale     = 1;
     Euclidean = euclideanTransformation;
 }
Пример #18
0
 /// <summary>
 /// Returns if the matrix is the identity matrix I.
 /// </summary>
 public bool IsIdentity(__ftype__ epsilon)
 {
     return(ApproximatelyEquals(this, Identity, epsilon));
 }
 public __type__(__ftype__ scale, __euclideannt__ euclideanTransformation)
 {
     Scale     = scale;
     Euclidean = euclideanTransformation;
 }
Пример #20
0
 public static bool __bopname__(__nmtype__ a, __ftype__ s)
 {
     return/*# n.ForEach(i => { m.ForEach(j => { */
            (a.M__i____j____bop__s /*# }, andand); }, andand); */);
 }
Пример #21
0
 public __type__(__ftype__ angleInRadians)
 {
     Angle = angleInRadians;
 }