|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Drives GeometrySlot transforms from stateless Kinesis fields. More...
#include <InstanceFieldOperator.hpp>
Inheritance diagram for MayaFlux::Nodes::Network::InstanceFieldOperator:
Collaboration diagram for MayaFlux::Nodes::Network::InstanceFieldOperator:Public Types | |
| using | PositionField = Kinesis::VectorField |
| using | TransformField = std::function< glm::mat4(const glm::mat4 &)> |
Public Member Functions | |
| void | bind_position (uint32_t slot_index, PositionField field) |
| Bind a PositionField to a slot. | |
| void | bind_transform (uint32_t slot_index, TransformField field) |
| Bind a TransformField to a slot. | |
| std::string_view | get_type_name () const override |
| Type name for introspection. | |
| bool | has_gpu_executor () const |
| Returns true if a GPU executor is currently attached. | |
| void | process (float dt) override |
| Process for one batch cycle. | |
| void | process_slot (GeometrySlot &slot, float dt) override |
| template<typename T > | |
| void | push_constants (const T &data) |
| Update push constants on the attached GPU executor. | |
| void | set_gpu_executor (std::shared_ptr< Yantra::ShaderExecutionContext<> > executor, bool continuous=true) |
| Attach a GPU executor and switch to async dispatch mode. | |
| void | unbind (uint32_t slot_index) |
| Remove all bindings for a slot. | |
| void | unbind_all () |
| Remove all bindings for all slots. | |
Public Member Functions inherited from MayaFlux::Nodes::Network::InstanceOperator | |
| void | process (float dt) override |
| Process for one batch cycle. | |
| std::optional< double > | query_state (std::string_view) const override |
| Query operator internal state. | |
| void | set_parameter (std::string_view, double) override |
| Set operator parameter. | |
| void | set_slots (std::vector< GeometrySlot > &slots) |
| ~InstanceOperator () override=default | |
Public Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator | |
| virtual void | apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source) |
| Apply ONE_TO_ONE parameter mapping (per-point control) | |
| virtual | ~NetworkOperator ()=default |
Private Attributes | |
| std::shared_ptr< Nodes::GpuSync::GpuComputeNode > | m_compute_node |
| std::shared_ptr< Yantra::ShaderExecutionContext<> > | m_executor |
| std::unordered_map< uint32_t, PositionField > | m_position_fields |
| std::unordered_map< uint32_t, TransformField > | m_transform_fields |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Nodes::Network::InstanceOperator | |
| std::vector< GeometrySlot > * | m_slots { nullptr } |
Drives GeometrySlot transforms from stateless Kinesis fields.
Each slot may have at most one PositionField or one TransformField bound, keyed by slot index. On each cycle the bound field is evaluated against the slot's current state and the result is written back into slot.transform.
PositionField receives the slot's current translation (column 3 of slot.transform as glm::vec3) and returns a new translation. Only column 3 is replaced; the rotational part of the matrix is preserved.
TransformField receives the slot's current transform as glm::mat4 and returns a replacement mat4. The full matrix is replaced.
Both field types are evaluated statelessly - no accumulated time, no internal integration. The field is a pure function of current slot state. For time-varying behaviour, close over a shared atomic or external clock in the field callable.
Slots without a bound field are untouched.
Definition at line 33 of file InstanceFieldOperator.hpp.