Example #1
0
 public BoundingBox3D(IShape3D obj, Point3D topLeftFront)
 {
     shape = obj;
     TopLeftFront = topLeftFront;
     Width = obj.GetWidth();
     Height = obj.GetHeight();
     Depth = obj.GetDepth();
 }
Example #2
0
 public bool ShapeContains(Point3D point)
 {
     return shape.Contains(point);
 }
Example #3
0
 public bool Contains(Point3D p)
 {
     return p.X >= TopLeftFront.X && p.X <= TopLeftFront.X + Width
         && p.Y >= TopLeftFront.Y && p.Y <= TopLeftFront.Y + Height
         && p.Z >= TopLeftFront.Z && p.Z <= TopLeftFront.Z + Depth;
 }