Пример #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());
 }
Пример #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());
 }
Пример #3
0
        public override bool Equals(object o)
        {
            if ((null == o) || !(o is Point3f))
            {
                return(false);
            }

            return(Point3f.Equals(this, (Point3f)o));
        }
Пример #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();
        }
Пример #5
0
 public bool Equals(Point3f value)
 {
     return Point3f.Equals(this, value);
 }
Пример #6
0
 public Point3f(Point3f other)
 {
     _x = other._x;
     _y = other._y;
     _z = other._z;
 }
Пример #7
0
 public static float Norm(Point3f a)
 {
     return (float)Math.Sqrt(Norm2(a));
 }
Пример #8
0
 public static float Norm2(Point3f a)
 {
     return (Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z));
 }
Пример #9
0
 public void Clear()
 {
     _min = new Point3f(Single.MaxValue, Single.MaxValue, Single.MaxValue);
     _max = new Point3f(Single.MinValue, Single.MinValue, Single.MinValue);
 }
Пример #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);
 }
Пример #11
0
 public static float Norm2(Point3f a)
 {
     return(Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z));
 }
Пример #12
0
 public static float Distance(Point3f a, Point3f b)
 {
     return((float)Math.Sqrt(Distance2(a, b)));
 }
Пример #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;
 }
Пример #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));
 }
Пример #15
0
 public bool Equals(Point3f value)
 {
     return(Point3f.Equals(this, value));
 }
Пример #16
0
 public static float Norm(Point3f a)
 {
     return((float)Math.Sqrt(Norm2(a)));
 }
Пример #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));
 }
Пример #18
0
 public Point3f(Point3f other)
 {
     _x = other._x;
     _y = other._y;
     _z = other._z;
 }
Пример #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);
 }
Пример #20
0
 public static float Distance(Point3f a, Point3f b)
 {
     return (float)Math.Sqrt(Distance2(a, b));
 }
Пример #21
0
 public abstract float Evaluate(Point3f pt);
Пример #22
0
 public BoundingBox(Point3f min, Point3f max)
 {
     _min = min;
     _max = max;
     Debug.Assert(Invariant());
 }
Пример #23
0
 public BoundingBox(Point3f min, Point3f max)
 {
     _min = min;
     _max = max;
     Debug.Assert(Invariant());
 }
Пример #24
0
 public void Clear()
 {
     _min = new Point3f(Single.MaxValue, Single.MaxValue, Single.MaxValue);
     _max = new Point3f(Single.MinValue, Single.MinValue, Single.MinValue);
 }
Пример #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));
 }