MayaFlux 0.5.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 144 of file ParticleNetwork.cpp.

145{
146 if (!m_operator) {
147 return std::nullopt;
148 }
149
150 if (auto* physics = dynamic_cast<const PhysicsOperator*>(m_operator.get())) {
151 return physics->get_particle_velocity(index);
152 }
153
154 return std::nullopt;
155}
uint32_t index
Definition VKDevice.cpp:142
std::unique_ptr< NetworkOperator > m_operator

References index, and m_operator.