Exemplo n.º 1
0
 public BoundingBox3D(IShape3D obj, Point3D topLeftFront)
 {
     shape = obj;
     TopLeftFront = topLeftFront;
     Width = obj.GetWidth();
     Height = obj.GetHeight();
     Depth = obj.GetDepth();
 }
Exemplo n.º 2
0
 public bool ShapeContains(Point3D point)
 {
     return shape.Contains(point);
 }
Exemplo n.º 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;
 }