Defines a bounding box by opposite corners (minimum and maximum point)
More...
#include <ptems/vector.hpp>
|
| constexpr | BBox () |
| | Create an undefined bounding box (has Maximum < Minimum) More...
|
| |
| constexpr | BBox (const Vector< DIM > &min, const Vector< DIM > &max) |
| | Create a bounding box. More...
|
| |
| constexpr void | AddPoint (const Vector< DIM > &point) |
| | Adds a point, expanding the bounding box as necessary. More...
|
| |
| constexpr BBox & | operator+= (const Vector< DIM > &point) |
| | Adds a point, expanding the bounding box as necessary. More...
|
| |
| constexpr BBox & | operator+= (const BBox< DIM > &rhs) |
| | Epands this bounding box to enclose the specefied bounding box as well. More...
|
| |
| constexpr Vector< DIM > | ToLocal (const Vector< 2 > &pt) |
| | Convert a global coordinate to a local coordinate on the bounding box space \([-1,1]^D\). More...
|
| |
| constexpr double | Volume () const |
| | Gets the area/volume/etc. More...
|
| |
| constexpr double | BoundarySize () const |
| | Gets the length/area of the boundary of the bounding box. More...
|
| |
| constexpr BBox< DIM > | Intersection (const BBox< DIM > &rhs) |
| | Creates a bounding box covering the intersection to this bounding box with the specified bounding box. More...
|
| |
| constexpr Vector< DIM > | Barycentre () const |
| | Gets the centre of the bounding box. More...
|
| |
template<std::size_t DIM>
struct ptems::BBox< DIM >
Defines a bounding box by opposite corners (minimum and maximum point)
- Template Parameters
-
| DIM | The dimension of the space the bounding box is in |
◆ BBox() [1/2]
template<std::size_t DIM>
Create an undefined bounding box (has Maximum < Minimum)
◆ BBox() [2/2]
template<std::size_t DIM>
Create a bounding box.
- Parameters
-
| min | Minimum point for the bounding box |
| max | Maximum point for the bounding box |
◆ AddPoint()
template<std::size_t DIM>
Adds a point, expanding the bounding box as necessary.
- Parameters
-
| point | Point to ensure inside bounding box |
◆ Barycentre()
template<std::size_t DIM>
Gets the centre of the bounding box.
◆ BoundarySize()
template<std::size_t DIM>
| constexpr double ptems::BBox< DIM >::BoundarySize |
( |
| ) |
const |
|
inlineconstexpr |
Gets the length/area of the boundary of the bounding box.
◆ Intersection()
template<std::size_t DIM>
Creates a bounding box covering the intersection to this bounding box with the specified bounding box.
- Parameters
-
| rhs | Bounding box to intersect with this bounding box |
- Returns
- New bounding box covering just the intersection between the bounding boxes
◆ operator+=() [1/2]
template<std::size_t DIM>
Epands this bounding box to enclose the specefied bounding box as well.
- Parameters
-
| rhs | Bounding box to encluse within this bounding box |
- Returns
- this
◆ operator+=() [2/2]
template<std::size_t DIM>
Adds a point, expanding the bounding box as necessary.
- Parameters
-
| point | Point to ensure inside bounding box |
- Returns
- this
◆ ToLocal()
template<std::size_t DIM>
Convert a global coordinate to a local coordinate on the bounding box space \([-1,1]^D\).
- Parameters
-
| pt | The point in global space |
- Returns
- Point in local space defined by this bounding box
◆ Volume()
template<std::size_t DIM>
Gets the area/volume/etc.
of the bounding box
◆ Maximum
template<std::size_t DIM>
The maximum point of the bounding box.
◆ Minimum
template<std::size_t DIM>
The minimum point of the bounding box.
The documentation for this struct was generated from the following file: