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

◆ get_metadata()

std::unordered_map< std::string, std::string > MayaFlux::Nodes::Network::ParticleNetwork::get_metadata ( ) const
overridevirtual

Get network metadata for debugging/visualization.

Returns
Map of property names to string representations

Subclasses can override to expose internal state:

  • Particle count, average velocity
  • Modal frequencies, decay times
  • Waveguide delay lengths etc.

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

Definition at line 148 of file ParticleNetwork.cpp.

149{
150 auto metadata = NodeNetwork::get_metadata();
151
152 metadata["point_count"] = std::to_string(get_node_count());
153 metadata["operator"] = std::string(m_operator ? m_operator->get_type_name() : "none");
154 metadata["timestep"] = std::to_string(m_timestep);
155 metadata["bounds_min"] = std::format("({:.2f}, {:.2f}, {:.2f})",
157 metadata["bounds_max"] = std::format("({:.2f}, {:.2f}, {:.2f})",
159
160 if (m_operator) {
161 if (auto* physics = dynamic_cast<PhysicsOperator*>(m_operator.get())) {
162 metadata["gravity"] = std::format("({:.2f}, {:.2f}, {:.2f})",
163 physics->get_gravity().x,
164 physics->get_gravity().y,
165 physics->get_gravity().z);
166 metadata["drag"] = std::to_string(physics->get_drag());
167
168 auto avg_vel = physics->query_state("avg_velocity");
169 if (avg_vel) {
170 metadata["avg_velocity"] = std::to_string(*avg_vel);
171 }
172 }
173 }
174
175 return metadata;
176}
virtual std::unordered_map< std::string, std::string > get_metadata() const
Get network metadata for debugging/visualization.
std::unique_ptr< NetworkOperator > m_operator
size_t get_node_count() const override
Get number of particles in network.

References MayaFlux::Nodes::Network::NodeNetwork::get_metadata(), get_node_count(), m_bounds, m_operator, m_timestep, MayaFlux::Kinesis::SamplerBounds::max, and MayaFlux::Kinesis::SamplerBounds::min.

+ Here is the call graph for this function: