예제 #1
0
        public static bounds_d FromPoints(double3 v0, double3 v1)
        {
            bounds_d newBounds = new bounds_d();

            newBounds.ConformTo(v0, v1);
            return(newBounds);
        }
예제 #2
0
        public bounds_d ExpandedToFit(bounds_d other)
        {
            bounds_d newBoundsD = this;

            newBoundsD.ExpandToFit(other);
            return(newBoundsD);
        }
예제 #3
0
 public bounds(bounds_d bounds)
 {
     _center  = bounds.center.toFloat3();
     _extents = bounds.extents.toFloat3();
     _size    = 2.0f * _extents;
     _min     = _center - _extents;
     _max     = _center + _extents;
 }
예제 #4
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool intersects(bounds_d b0, bounds_d b1)
 {
     return(b0.max.x > b1.min.x &&
            b0.min.x < b1.max.x &&
            b0.max.y > b1.min.y &&
            b0.min.y < b1.max.y &&
            b0.max.z > b1.min.z &&
            b0.min.z < b1.max.z);
 }
예제 #5
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool equal(bounds_d b0, bounds_d b1)
 {
     return(all(equal(b0.center, b1.center) & equal(b0.extents, b1.extents)));
 }
예제 #6
0
 public void ExpandToFit(bounds_d other)
 {
     ConformTo(min(_min, other.min), min(_max, other.max));
 }