Template Class BoundingBox
Defined in File BoundingBox.hpp
Class Documentation
-
template<typename BaseVecT>
class BoundingBox A dynamic bounding box class.
Public Functions
-
BoundingBox()
Default constructor.
-
template<typename T>
BoundingBox(T v1, T v2) Constructs a bounding box with from the given vertices.
- Parameters:
v1 – Lower left corner of the BoundingBox
v2 – Upper right corner of the BoundingBox
- Returns:
-
explicit BoundingBox(std::string plyPath)
Constructs a bounding box for a given point cloud.
- Parameters:
plyPath – path of the point cloud
-
template<typename T>
inline void expand(T v) Expands the bounding box if the given Vector v} is outside the current volume.
- Parameters:
v – A 3d Vector
-
inline void expand(const BoundingBox<BaseVecT> &bb)
Calculates the surrounding bounding box of the current volume and the other given bounding box.
- Parameters:
bb – Another bounding box
-
BaseVecT::CoordType getRadius() const
Returns the radius of the current volume, i.e. the distance between the centroid and the most distant corner from this Vector.
-
bool isValid() const
Returns true if the bounding box has been expanded before or was initialized with a preset size.
-
bool contains(const BaseVecT &v) const
Checks if the given Vector is inside the bounding box.
- Parameters:
v – The Vector
-
bool overlap(const BoundingBox<BaseVecT> &bb) const
check if current volume overlap with a given bounding box
- Parameters:
bb – Another bounding box
- Returns:
true if both boxes overlap
-
BoundingBox()