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

◆ integrate()

void MayaFlux::Nodes::Network::PhysicsOperator::integrate ( float  dt)
private

Definition at line 482 of file PhysicsOperator.cpp.

483{
484 for (auto& group : m_collections) {
485 auto& points = group.collection->get_points();
486
487 for (size_t i = 0; i < points.size(); ++i) {
488 auto& state = group.physics_state[i];
489 auto& vertex = points[i];
490
491 glm::vec3 acceleration = state.force / state.mass;
492 state.velocity += acceleration * dt;
493 state.velocity *= (1.0F - m_drag);
494 vertex.position += state.velocity * dt;
495
496 state.force = glm::vec3(0.0F);
497 }
498 }
499}
std::vector< CollectionGroup > m_collections

References m_collections, and m_drag.

Referenced by process().

+ Here is the caller graph for this function: