MayaFlux 0.3.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 146 of file ParticleNetwork.cpp.

147{
148 auto metadata = NodeNetwork::get_metadata();
149
150 metadata["point_count"] = std::to_string(get_node_count());
151 metadata["operator"] = std::string(m_operator ? m_operator->get_type_name() : "none");
152 metadata["timestep"] = std::to_string(m_timestep);
153 metadata["bounds_min"] = std::format("({:.2f}, {:.2f}, {:.2f})",
155 metadata["bounds_max"] = std::format("({:.2f}, {:.2f}, {:.2f})",
157
158 if (m_operator) {
159 if (auto* physics = dynamic_cast<PhysicsOperator*>(m_operator.get())) {
160 metadata["gravity"] = std::format("({:.2f}, {:.2f}, {:.2f})",
161 physics->get_gravity().x,
162 physics->get_gravity().y,
163 physics->get_gravity().z);
164 metadata["drag"] = std::to_string(physics->get_drag());
165
166 auto avg_vel = physics->query_state("avg_velocity");
167 if (avg_vel) {
168 metadata["avg_velocity"] = std::to_string(*avg_vel);
169 }
170 }
171 }
172
173 return metadata;
174}
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: