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

◆ get_node_output()

std::optional< double > MayaFlux::Nodes::Network::ParticleNetwork::get_node_output ( size_t  index) const
overridevirtual

Get output value for specific particle.

Parameters
indexParticle index (0 to get_node_count()-1)

Returns per-particle output (e.g., velocity magnitude). Used for ONE_TO_ONE parameter mapping from this network to other networks.

Reimplemented from MayaFlux::Nodes::Network::NodeNetwork.

Definition at line 152 of file ParticleNetwork.cpp.

153{
154 if (!m_operator) {
155 return std::nullopt;
156 }
157
158 if (auto* physics = dynamic_cast<const PhysicsOperator*>(m_operator.get())) {
159 return physics->get_particle_velocity(index);
160 }
161
162 return std::nullopt;
163}
uint32_t index
Definition VKDevice.cpp:122
std::unique_ptr< NetworkOperator > m_operator

References index, and m_operator.