86 void unbind(uint32_t slot_index,
FieldTarget target);
92 void unbind_slot(uint32_t slot_index);
104 void set_mode(uint32_t slot_index,
FieldMode mode);
114 void process_slot(
MeshSlot& slot,
float dt)
override;
149 void set_gpu_executor(
151 bool continuous =
true);
161 template <
typename T>
165 m_executor->push(data);
167 m_compute_node->set_dirty();
176 void process(
float dt)
override;
179 std::unordered_map<uint32_t, std::shared_ptr<FieldOperator>>
m_field_ops;
188 [[nodiscard]] std::shared_ptr<FieldOperator>
189 get_or_create(
MeshSlot& slot, uint32_t slot_index);
191 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.
FieldTarget
What a Tendency drives when applied to a vertex record.
FieldMode
How a field result combines with the value already present.
Typed, composable, stateless callable from domain D to range R.
Named, independently transformable mesh unit within a MeshNetwork.