Template Struct BoundingBox

Struct Documentation

template<typename T>
struct BoundingBox

Bounding box used by the Octree class.

Public Functions

inline BoundingBox()

Constructor for creating an empty bounding box of size 0.

inline BoundingBox(const Point<T> &center, const T sideLength)

Constructor for creating a bounding box.

Parameters:
  • center[in] The center of the bounding box.

  • sideLength[in] The side length of the bounding box.

inline void setCenter(const Point<T> &center)

Sets the center of the bounding box.

Parameters:

center[in] New center.

inline Point<T> &getCenter()
Returns:

Center of bounding box.

inline void setSideLength(T sideLength)

Sets the side length of the bounding box.

Parameters:

sideLength[in] New side length.

inline T getSideLength() const
Returns:

Side length of bounding box.

inline T getHalfSideLength() const
Returns:

Half of the side length of bounding box.

inline T getSqSideLength() const
Returns:

Square of the side length of bounding box.

inline bool contains(const Point<T> &point) const
Returns:

True if point point is inside the bounding box.