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()); }
public override bool Equals(object o) { if ((null == o) || !(o is Point3f)) { return(false); } return(Point3f.Equals(this, (Point3f)o)); }
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(); }
public bool Equals(Point3f value) { return Point3f.Equals(this, value); }
public Point3f(Point3f other) { _x = other._x; _y = other._y; _z = other._z; }
public static float Norm(Point3f a) { return (float)Math.Sqrt(Norm2(a)); }
public static float Norm2(Point3f a) { return (Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z)); }
public void Clear() { _min = new Point3f(Single.MaxValue, Single.MaxValue, Single.MaxValue); _max = new Point3f(Single.MinValue, Single.MinValue, Single.MinValue); }
public static bool Equals(Point3f a, Point3f b) { return a.X.Equals(b.X) && a.Y.Equals(b.Y) && a.Z.Equals(b.Z); }
public static float Norm2(Point3f a) { return(Utils.squared(a._x) + Utils.squared(a._y) + Utils.squared(a._z)); }
public static float Distance(Point3f a, Point3f b) { return((float)Math.Sqrt(Distance2(a, b))); }
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; }
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)); }
public bool Equals(Point3f value) { return(Point3f.Equals(this, value)); }
public static float Norm(Point3f a) { return((float)Math.Sqrt(Norm2(a))); }
public static bool Equals(Point3f a, Point3f b) { return(a.X.Equals(b.X) && a.Y.Equals(b.Y) && a.Z.Equals(b.Z)); }
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); }
public static float Distance(Point3f a, Point3f b) { return (float)Math.Sqrt(Distance2(a, b)); }
public abstract float Evaluate(Point3f pt);
public BoundingBox(Point3f min, Point3f max) { _min = min; _max = max; Debug.Assert(Invariant()); }
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)); }