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

◆ with_contains()

Element & MayaFlux::Portal::Forma::Element::with_contains ( std::function< bool(glm::vec2)>  fn)
inline

Set an explicit containment predicate.

Use for any non-rectangular region: circles, polygons, strokes, Voronoi cells, audio waveform envelopes. Pair with with_bounds for a circumscribed AABB fast-reject when the predicate is expensive.

Kinesis::circular_bounds, polygon_bounds, stroke_bounds, union_bounds, subtract_bounds, and intersect_bounds are all valid arguments.

Definition at line 111 of file Element.hpp.

112 {
113 contains = std::move(fn);
114 return *this;
115 }
std::function< bool(glm::vec2)> contains
Authoritative containment test in NDC space.
Definition Element.hpp:68