Пример #1
0
        public bounds ExpandedToFit(bounds other)
        {
            bounds newBounds = this;

            newBounds.ExpandToFit(other);
            return(newBounds);
        }
Пример #2
0
        public static bounds FromPoints(float3 v0, float3 v1)
        {
            bounds newBounds = new bounds();

            newBounds.ConformTo(v0, v1);
            return(newBounds);
        }
Пример #3
0
 public bounds_d(bounds bounds)
 {
     _center  = bounds.center;
     _extents = bounds.extents;
     _size    = 2.0 * _extents;
     _min     = _center - _extents;
     _max     = _center + _extents;
 }
Пример #4
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool intersects(bounds b0, bounds 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
 public void ExpandToFit(bounds other)
 {
     ConformTo(min(_min, other.min), min(_max, other.max));
 }
Пример #6
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool equal(bounds b0, bounds b1)
 {
     return(all(equal(b0.center, b1.center) & equal(b0.extents, b1.extents)));
 }