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

◆ update_point_nodes()

void MayaFlux::Nodes::Network::ParticleNetwork::update_point_nodes ( )
private

Update PointNode states from physics.

Definition at line 490 of file ParticleNetwork.cpp.

491{
492 for (auto& particle : m_particles) {
493 float speed = glm::length(particle.velocity);
494 float normalized_speed = glm::clamp(speed / 10.0F, 0.0F, 1.0F);
495
496 // Map speed to color: blue (slow) → red (fast)
497 glm::vec3 color(normalized_speed, 0.3F, 1.0F - normalized_speed);
498 particle.point->set_color(color);
499
500 particle.point->compute_frame();
501 }
502}

References m_particles.

Referenced by initialize_particle_positions(), process_batch(), and reset().

+ Here is the caller graph for this function: