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

◆ integrate()

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

Definition at line 489 of file PhysicsOperator.cpp.

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

References m_collections, and m_drag.

Referenced by process().

+ Here is the caller graph for this function: