public static AxisAlignedBoundingBox SurroundingBox(AxisAlignedBoundingBox box0, AxisAlignedBoundingBox box1)
        {
            var small = new Vec3(Math.Min(box0.Min().X(), box1.Min().X()),
                                 Math.Min(box0.Min().Y(), box1.Min().Y()),
                                 Math.Min(box0.Min().Z(), box1.Min().Z()));
            var big = new Vec3(Math.Max(box0.Max().X(), box1.Max().X()),
                               Math.Max(box0.Max().Y(), box1.Max().Y()),
                               Math.Max(box0.Max().Z(), box1.Max().Z()));

            return(new AxisAlignedBoundingBox(small, big));
        }
Beispiel #2
0
 public override bool BoundingBox(double t0, double t1, out AxisAlignedBoundingBox box)
 {
     box = new AxisAlignedBoundingBox(new Vec3(_x0, _k - 0.0001, _z0), new Vec3(_x1, _k + 0.0001, _z0));
     return(true);
 }
Beispiel #3
0
 public override bool BoundingBox(double t0, double t1, out AxisAlignedBoundingBox boundingBox)
 {
     boundingBox = new AxisAlignedBoundingBox(_center - new Vec3(_radius, _radius, _radius),
                                              _center + new Vec3(_radius, _radius, _radius));
     return(true);
 }
Beispiel #4
0
 public override bool BoundingBox(double t0, double t1, out AxisAlignedBoundingBox boundingBox)
 {
     boundingBox = box;
     return(true);
 }