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

◆ with_stroke()

Element & MayaFlux::Portal::Forma::Element::with_stroke ( std::span< const glm::vec2 >  pts,
float  half_thickness 
)
inline

Set a stroke-based containment predicate.

A point is inside if its perpendicular distance to any segment of pts is within half_thickness NDC units. Covers paths, wires, cable routes, waveform traces, and any open or closed curve.

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

Definition at line 166 of file Element.hpp.

167 {
168 contains = Kinesis::stroke_bounds(pts, half_thickness);
169 return *this;
170 }
std::function< bool(glm::vec2)> stroke_bounds(std::span< const glm::vec2 > points, float half_thickness)
Containment test for a polyline with a uniform half-thickness.
Definition Bounds.hpp:267
std::function< bool(glm::vec2)> contains
Authoritative containment test in NDC space.
Definition Element.hpp:68