Esempio n. 1
0
 public static bool ApproxEquals(NuGenPnt3D a, NuGenPnt3D b)
 {
     return
         (Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_DOUBLE &&
          Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_DOUBLE &&
          Math.Abs(a._x[2] - b._x[2]) < NuGenVector.TINY_DOUBLE);
 }
Esempio n. 2
0
 public static NuGenPnt3D Max(NuGenPnt3D a, NuGenPnt3D b)
 {
     return(new NuGenPnt3D(
                Math.Max(a._x[0], b._x[0]),
                Math.Max(a._x[1], b._x[1]),
                Math.Max(a._x[2], b._x[2])
                ));
 }
Esempio n. 3
0
        public override bool Equals(object obj)
        {
            NuGenPnt3D x = (NuGenPnt3D)obj;

            return(
                _x[0] == x._x[0] &&
                _x[1] == x._x[1] &&
                _x[2] == x._x[2]
                );
        }
Esempio n. 4
0
 public NuGenRay3D(NuGenPnt3D p, NuGenVec3D v)
 {
     this.p = p;
     this.v = v;
 }
Esempio n. 5
0
 public static NuGenBox3D operator+(NuGenBox3D b, NuGenBox3D c)
 {
     return(new NuGenBox3D(NuGenPnt3D.Min(b.lower, c.lower), NuGenPnt3D.Max(b.upper, c.upper)));
 }
Esempio n. 6
0
 public bool IsOnBorder(NuGenPnt3D p)
 {
     return(IsInsideOrOnBorder(p) && !IsInside(p));
 }
Esempio n. 7
0
 public bool IsInsideOrOnBorder(NuGenPnt3D p)
 {
     return(lower <= p && upper >= p);
 }
Esempio n. 8
0
 public bool IsInside(NuGenPnt3D p)
 {
     return(lower < p && upper > p);
 }
Esempio n. 9
0
 public NuGenBox3D(NuGenPnt3D lower, NuGenPnt3D upper)
 {
     this.lower = lower;
     this.upper = upper;
 }