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

◆ bind_field() [1/2]

template<typename Field , typename Operator >
Influence< Field >::Target MayaFlux::Nexus::bind_field ( const Operator &  op,
Kinesis::FieldTarget  target 
)

Target that feeds an influence of fields into an operator's vertex attributes.

Template Parameters
FieldKinesis::VectorField, SpatialField or UVField, matching target.
Parameters
opFieldOperator, as a raw pointer from create_operator or a shared_ptr.
targetVertex attribute mask the field drives.

Binds one forwarding field to op now, and every time the influence runs the target replaces what that field forwards to. Other fields bound to the same target are left alone, which unbinding and rebinding each tick would not do. The operator is not retained. The influence and the operator must run on the same tick domain.

Definition at line 34 of file FieldTargets.hpp.

37{
38 auto cell = std::make_shared<Field>();
39 op->bind(target, detail::forwarding(cell));
40 return [cell](const Field& field) { *cell = field; };
41}

References MayaFlux::Nexus::detail::forwarding().

+ Here is the call graph for this function: