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