Axis-aligned 2D bounding box in world coordinates.
More...
#include <bbox2d.hpp>
|
| constexpr | BBox2D ()=default |
| constexpr | BBox2D (const glm::vec2 &min_p, const glm::vec2 &max_p) |
| constexpr | BBox2D (float xmin, float xmax, float ymin, float ymax) |
| constexpr bool | contains (const glm::vec2 &p) const |
| constexpr glm::vec2 | clamp (const glm::vec2 &p) const |
| constexpr glm::vec2 | size () const |
| constexpr glm::vec2 | center () const |
| constexpr glm::vec4 | to_vec4 () const |
Axis-aligned 2D bounding box in world coordinates.
◆ BBox2D() [1/3]
◆ BBox2D() [2/3]
| hmap::BBox2D::BBox2D |
( |
const glm::vec2 & | min_p, |
|
|
const glm::vec2 & | max_p ) |
|
inlineconstexpr |
◆ BBox2D() [3/3]
| hmap::BBox2D::BBox2D |
( |
float | xmin, |
|
|
float | xmax, |
|
|
float | ymin, |
|
|
float | ymax ) |
|
inlineconstexpr |
◆ unit()
| constexpr BBox2D hmap::BBox2D::unit |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ contains()
| bool hmap::BBox2D::contains |
( |
const glm::vec2 & | p | ) |
const |
|
inlineconstexpr |
◆ clamp()
| glm::vec2 hmap::BBox2D::clamp |
( |
const glm::vec2 & | p | ) |
const |
|
inlineconstexpr |
◆ size()
| glm::vec2 hmap::BBox2D::size |
( |
| ) |
const |
|
inlineconstexpr |
◆ center()
| glm::vec2 hmap::BBox2D::center |
( |
| ) |
const |
|
inlineconstexpr |
◆ to_vec4()
| glm::vec4 hmap::BBox2D::to_vec4 |
( |
| ) |
const |
|
inlineconstexpr |
◆ from_vec4()
| constexpr BBox2D hmap::BBox2D::from_vec4 |
( |
const glm::vec4 & | v | ) |
|
|
inlinestaticconstexpr |
◆ min
| glm::vec2 hmap::BBox2D::min {0.f, 0.f} |
◆ max
| glm::vec2 hmap::BBox2D::max {1.f, 1.f} |
The documentation for this struct was generated from the following file: