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

158{
159 auto metadata = NodeNetwork::get_metadata();
160
161 metadata["point_count"] = std::to_string(get_node_count());
162 metadata["operator"] = std::string(m_operator ? m_operator->get_type_name() : "none");
163 metadata["timestep"] = std::to_string(m_timestep);
164 metadata["bounds_min"] = std::format("({:.2f}, {:.2f}, {:.2f})",
166 metadata["bounds_max"] = std::format("({:.2f}, {:.2f}, {:.2f})",
168
169 if (m_operator) {
170 if (auto* physics = dynamic_cast<PhysicsOperator*>(m_operator.get())) {
171 metadata["gravity"] = std::format("({:.2f}, {:.2f}, {:.2f})",
172 physics->get_gravity().x,
173 physics->get_gravity().y,
174 physics->get_gravity().z);
175 metadata["drag"] = std::to_string(physics->get_drag());
176
177 auto avg_vel = physics->query_state("avg_velocity");
178 if (avg_vel) {
179 metadata["avg_velocity"] = std::to_string(*avg_vel);
180 }
181 }
182 }
183
184 return metadata;
185}
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: