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

◆ with_containment()

Element & MayaFlux::Portal::Forma::Element::with_containment ( const Kinesis::HitRegion2D & region)
inline

Set bounds_hint and contains from one hit region.

The clip is written only when the region carries one, so a clip set by a container such as Scrollable survives. For one field alone use with_bounds or with_contains.

Definition at line 139 of file Element.hpp.

140 {
141 bounds_hint = region.bounds;
142 contains = region.contains;
143 if (region.clip)
144 clip = region.clip;
145 return *this;
146 }
std::function< bool(glm::vec2)> contains
Authoritative containment test in NDC space.
Definition Element.hpp:78
std::optional< Kinesis::AABB2D > clip
Optional region outside which hit testing rejects the element.
Definition Element.hpp:74
std::optional< Kinesis::AABB2D > bounds_hint
Optional fast-reject bounds in NDC space.
Definition Element.hpp:68

References MayaFlux::Kinesis::HitRegion< Point, Box >::bounds, bounds_hint, MayaFlux::Kinesis::HitRegion< Point, Box >::clip, clip, MayaFlux::Kinesis::HitRegion< Point, Box >::contains, and contains.

Referenced by MayaFlux::Portal::Forma::apply_containment().

Here is the caller graph for this function: