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

◆ at()

template<Kinesis::HasBounds B, typename F , typename... Args>
auto MayaFlux::Portal::Forma::Geometry::at ( const B anchor,
F &&  factory,
Args &&...  args 
) -> decltype(std::forward<F>(factory)(Kinesis::bounds_of(anchor), std::forward<Args>(args)...))

Call a bounds-taking factory with an anchor's region.

Any factory whose first parameter is a Kinesis::AABB2D accepts any Kinesis::HasBounds object through this, including factories written by the caller. Nothing is enumerated and no geometry is privileged.

Trailing factory defaults still apply; arguments passed here are forwarded in order after the derived bounds.

auto fader = Forma::create(surface, Geometry::horizontal_fader(track, 0.04F), 0.5F);
auto meter = Forma::create(surface, Geometry::at(fader, Geometry::level_meter), 0.F);
auto at(const B &anchor, F &&factory, Args &&... args) -> decltype(std::forward< F >(factory)(Kinesis::bounds_of(anchor), std::forward< Args >(args)...))
Call a bounds-taking factory with an anchor's region.
Definition Geometry.hpp:152
Form< float > level_meter(Kinesis::AABB2D bounds, bool horizontal, glm::vec3 fill_color, glm::vec3 track_color)
Geometry function for a level meter in NDC space.
Form< float > horizontal_fader(Kinesis::AABB2D bounds, float handle_w, glm::vec3 track_color, glm::vec3 handle_color)
Geometry function for a horizontal fader in NDC space.
Mapped< T > create(Surface &surface, Geometry::Form< T > form, T initial, std::function< float(T)> project={})
Realize a Form on surface.
Definition Forma.hpp:277
Parameters
anchorAny object exposing bounds().
factoryFactory taking Kinesis::AABB2D as its first parameter.
argsRemaining factory arguments.

Definition at line 152 of file Geometry.hpp.

154{
155 return std::forward<F>(factory)(Kinesis::bounds_of(anchor), std::forward<Args>(args)...);
156}

References MayaFlux::Kinesis::bounds_of().

+ Here is the call graph for this function: