|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
A region a point can hit: fast reject bounds, an authoritative containment test, and an optional clip. More...
#include <HitRegion.hpp>
Public Member Functions | |
| bool | hits (Point p) const |
| Whether a point hits this region. | |
Static Public Member Functions | |
| static bool | test (const std::optional< Box > &clip, const std::optional< Box > &bounds, const std::function< bool(Point)> &contains, Point p) |
| hits() over three parts held elsewhere, without copying them. | |
Public Attributes | |
| std::optional< Box > | bounds |
| Fast reject box; must circumscribe contains when both are set. | |
| std::optional< Box > | clip |
| Region outside which nothing hits, regardless of the other parts. | |
| std::function< bool(Point)> | contains |
| Authoritative containment test. | |
A region a point can hit: fast reject bounds, an authoritative containment test, and an optional clip.
The three parts are independent, so any bounds function composes with any box. hits() applies them in one fixed order:
Dimension aliases follow the box family: HitRegion1D with AABB1D over a scalar coordinate, HitRegion2D with AABB2D, HitRegion3D with AABB3D.
Usage:
| Point | Coordinate type: double, glm::vec2 or glm::vec3. |
| Box | Box type with contains(Point), as AABB1D, AABB2D and AABB3D have. |
Definition at line 35 of file HitRegion.hpp.