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

◆ process_slot()

void MayaFlux::Nodes::Network::MeshTransformOperator::process_slot ( MeshSlot slot,
float  dt 
)
overridevirtual

Evaluate the bound field (if any), update local_transform, then propagate the world_transform from the parent.

Implements MayaFlux::Nodes::Network::MeshOperator.

Definition at line 37 of file MeshTransformOperator.cpp.

38{
39 auto field_it = m_fields.find(slot.index);
40 if (field_it != m_fields.end() && field_it->second) {
41 float& t = m_accumulated_time[slot.index];
42 t += dt;
43 slot.local_transform = field_it->second(t);
44 }
45
46 slot.world_transform = parent_world(slot) * slot.local_transform;
47 slot.dirty = true;
48}
std::unordered_map< uint32_t, float > m_accumulated_time
Per-slot accumulated time in seconds, keyed by slot index.
std::unordered_map< uint32_t, TransformField > m_fields
glm::mat4 parent_world(const MeshSlot &slot) const
Resolve the world transform of a slot's parent, or identity if root.

References MayaFlux::Nodes::Network::MeshSlot::dirty, MayaFlux::Nodes::Network::MeshSlot::index, MayaFlux::Nodes::Network::MeshSlot::local_transform, m_accumulated_time, m_fields, parent_world(), and MayaFlux::Nodes::Network::MeshSlot::world_transform.

Referenced by process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: