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

◆ create_element() [1/2]

template<typename T >
Mapped< T > MayaFlux::Portal::Forma::internal::Atelier::create_element ( Surface &  surface,
FormaTarget  target,
GeometryFn< T >  geom,
T  initial,
std::function< float(T)>  project = {} 
)
inline

create_element writing into target, which may be a slice shared with other elements.

Definition at line 183 of file Atelier.hpp.

188 {})
189 {
190 auto mapped = make_mapped<T>(
191 std::move(initial), std::move(geom), std::move(target));
192 mapped.element.id = surface.layer().add(mapped.element);
194 surface.layer(), mapped, std::move(project));
195
196 mapped.sync(&surface.layer());
197
198 return mapped;
199 }
void register_element(const ElementRef &ref, std::shared_ptr< MappedState< T > > state, std::shared_ptr< Buffers::FormaBuffer > buffer, std::function< float(T)> project={})
Register a MappedState<T> so that MappedState overloads and outbound bindings can resolve to the corr...
Definition Bridge.hpp:378
Bridge & bridge()
Bridge instance constructed during initialize.
Definition Atelier.cpp:80