85 void unbind(uint32_t slot_index,
FieldTarget target);
91 void unbind_slot(uint32_t slot_index);
103 void set_mode(uint32_t slot_index,
FieldMode mode);
113 void process_slot(
MeshSlot& slot,
float dt)
override;
148 void set_gpu_executor(
150 bool continuous =
true);
160 template <
typename T>
164 m_executor->push(data);
166 m_compute_node->set_dirty();
175 void process(
float dt)
override;
178 std::unordered_map<uint32_t, std::shared_ptr<FieldOperator>>
m_field_ops;
187 [[nodiscard]] std::shared_ptr<FieldOperator>
188 get_or_create(
MeshSlot& slot, uint32_t slot_index);
190 std::shared_ptr<Yantra::ShaderExecutionContext<>>
m_executor;
void bind(uint32_t slot_index, FieldTarget target, Kinesis::SpatialField field)
Bind a SpatialField to a slot.
std::unordered_map< uint32_t, std::shared_ptr< FieldOperator > > m_field_ops
std::shared_ptr< Yantra::ShaderExecutionContext<> > m_executor
void push_constants(const T &data)
Update push constants on the attached GPU executor.
MeshFieldOperator()=default
std::vector< size_t > m_gpu_slot_vertex_counts
Vertex count per slot index, snapshotted at set_gpu_executor() time.
~MeshFieldOperator() override=default
std::shared_ptr< Nodes::GpuSync::GpuComputeNode > m_compute_node
void bind(uint32_t slot_index, FieldTarget target, Kinesis::UVField field)
Bind a UVField 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.
Chain operator that applies Tendency field deformation to the vertex data of individual MeshNetwork s...
Abstract base for operators that process MeshNetwork slots.
Concrete GpuExecutionContext for a single fixed shader with fixed bindings.
FieldMode
How fields are applied each frame.
FieldTarget
Vertex attribute targets for Tendency field evaluation.
Typed, composable, stateless callable from domain D to range R.
Named, independently transformable mesh unit within a MeshNetwork.