MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ with_polygon()

Element & MayaFlux::Portal::Forma::Element::with_polygon ( std::span< const glm::vec2 >  verts)
inline

Set a polygon containment predicate.

Uses the winding number algorithm, covering both convex and non-convex shapes. Vertices are in NDC, ordered CW or CCW.

bounds_hint is independent — set it separately if a cheap pre-filter is useful for this region.

Definition at line 164 of file Element.hpp.

165 {
167 return *this;
168 }
std::function< bool(glm::vec2)> polygon_bounds(std::span< const glm::vec2 > vertices)
Containment test for a convex or concave polygon.
Definition Bounds.hpp:272
std::function< bool(glm::vec2)> contains
Authoritative containment test in NDC space.
Definition Element.hpp:77

References contains.