Esempio n. 1
0
 public BoundingBox(float minx, float miny, float minz,
                    float maxx, float maxy, float maxz)
 {
     _min = new Point3f(minx, miny, minz);
     _max = new Point3f(maxx, maxy, maxz);
     Debug.Assert(Invariant());
 }
Esempio n. 2
0
 public BoundingBox(float minx, float miny, float minz,
                    float maxx, float maxy, float maxz)
 {
     _min = new Point3f(minx, miny, minz);
     _max = new Point3f(maxx, maxy, maxz);
     Debug.Assert(Invariant());
 }
Esempio n. 3
0
        public override bool Equals(object o)
        {
            if ((null == o) || !(o is Point3f))
            {
                return(false);
            }

            return(Point3f.Equals(this, (Point3f)o));
        }
Esempio n. 4
0
        public Evaluator(Point3f[] points, InOut[] inout)
        {
            _points = points;
            _len    = _points.Length;
            Debug.Assert(_len > 3); // should also check for non-coplanarity

            _inout = inout;
            Debug.Assert(_len <= _inout.Length);

            _bbox = ComputeBBox();
        }
Esempio n. 5
0
 public bool Equals(Point3f value)
 {
     return Point3f.Equals(this, value);
 }
Esempio n. 6
0
 public Point3f(Point3f other)
 {
     _x = other._x;
     _y = other._y;
     _z = other._z;
 }
Esempio n. 7
0
 public static float Norm(Point3f a)
 {
     return (float)Math.Sqrt(Norm2(a));
 }
Esempio n. 8
0
 public static float Norm2(Point3f a)
 {
     return (Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z));
 }
Esempio n. 9
0
 public void Clear()
 {
     _min = new Point3f(Single.MaxValue, Single.MaxValue, Single.MaxValue);
     _max = new Point3f(Single.MinValue, Single.MinValue, Single.MinValue);
 }
Esempio n. 10
0
 public static bool Equals(Point3f a, Point3f b)
 {
     return a.X.Equals(b.X) &&
            a.Y.Equals(b.Y) &&
            a.Z.Equals(b.Z);
 }
Esempio n. 11
0
 public static float Norm2(Point3f a)
 {
     return(Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z));
 }
Esempio n. 12
0
 public static float Distance(Point3f a, Point3f b)
 {
     return((float)Math.Sqrt(Distance2(a, b)));
 }
Esempio n. 13
0
 public static bool AlmostEqual(Point3f a, Point3f b)
 {
     return Math.Abs(a._x - b._x) < eps && Math.Abs(a._y - b._y) < eps && Math.Abs(a._z - b._z) < eps;
 }
Esempio n. 14
0
 public static float Distance2(Point3f a, Point3f b)
 {
     return (Utils.squared(a._x - b._x) + Utils.squared(a._y - b._y) + Utils.squared(a._z - b._z));
 }
Esempio n. 15
0
 public bool Equals(Point3f value)
 {
     return(Point3f.Equals(this, value));
 }
Esempio n. 16
0
 public static float Norm(Point3f a)
 {
     return((float)Math.Sqrt(Norm2(a)));
 }
Esempio n. 17
0
 public static bool Equals(Point3f a, Point3f b)
 {
     return(a.X.Equals(b.X) &&
            a.Y.Equals(b.Y) &&
            a.Z.Equals(b.Z));
 }
Esempio n. 18
0
 public Point3f(Point3f other)
 {
     _x = other._x;
     _y = other._y;
     _z = other._z;
 }
Esempio n. 19
0
 public static bool AlmostEqual(Point3f a, Point3f b)
 {
     return(Math.Abs(a._x - b._x) < eps && Math.Abs(a._y - b._y) < eps && Math.Abs(a._z - b._z) < eps);
 }
Esempio n. 20
0
 public static float Distance(Point3f a, Point3f b)
 {
     return (float)Math.Sqrt(Distance2(a, b));
 }
Esempio n. 21
0
 public abstract float Evaluate(Point3f pt);
Esempio n. 22
0
 public BoundingBox(Point3f min, Point3f max)
 {
     _min = min;
     _max = max;
     Debug.Assert(Invariant());
 }
Esempio n. 23
0
 public BoundingBox(Point3f min, Point3f max)
 {
     _min = min;
     _max = max;
     Debug.Assert(Invariant());
 }
Esempio n. 24
0
 public void Clear()
 {
     _min = new Point3f(Single.MaxValue, Single.MaxValue, Single.MaxValue);
     _max = new Point3f(Single.MinValue, Single.MinValue, Single.MinValue);
 }
Esempio n. 25
0
 public static float Distance2(Point3f a, Point3f b)
 {
     return(Utils.squared(a._x - b._x) + Utils.squared(a._y - b._y) + Utils.squared(a._z - b._z));
 }