48 template<
typename BaseVecT>
100 typename BaseVecT::CoordType
getRadius()
const;
129 typename BaseVecT::CoordType
getXSize()
const;
134 typename BaseVecT::CoordType
getYSize()
const;
139 typename BaseVecT::CoordType
getZSize()
const;
145 typename BaseVecT::CoordType
getVolume()
const;
168 template<
typename BaseVecT>
169 inline std::ostream& operator<<(std::ostream& os, const BoundingBox<BaseVecT>& bb)
171 os <<
"Bounding Box[min: " << bb.getMin() <<
" max: " << bb.getMax();
172 os <<
" dimension: " << bb.getXSize() <<
", " << bb.getYSize() <<
", " 173 << bb.getZSize() <<
"]" << std::endl;
179 #include "lvr2/geometry/BoundingBox.tcc" bool isValid() const
Returns true if the bounding box has been expanded before or was initialized with a preset size...
BaseVecT::CoordType getLongestSide() const
Returns the longest side of the bounding box.
void expand(T v)
Expands the bounding box if the given Vector v} is outside the current volume.
BaseVecT getMin() const
Returns the lower left coordinates.
BaseVecT::CoordType getZSize() const
Returns the z-size of the bounding box.
BaseVecT::CoordType getYSize() const
Returns the y-size of the bounding box.
A dynamic bounding box class.
BaseVecT getCentroid() const
Returns the center Vector of the bounding box.
BaseVecT m_centroid
The center Vector of the bounding box.
BaseVecT m_max
The upper right Vector of the bounding box.
BaseVecT getMax() const
Returns the upper right coordinates.
BoundingBox()
Default constructor.
BaseVecT m_min
The lower left Vector of the bounding box.
BaseVecT::CoordType getXSize() const
Returns the x-size of the bounding box.
BaseVecT::CoordType getRadius() const
Returns the radius of the current volume, i.e. the distance between the centroid and the most distant...
BaseVecT::CoordType getVolume() const
Returns the volume of the bounding box.
bool overlap(const BoundingBox< BaseVecT > &bb)
check if current volume overlap with a given bounding box