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

◆ apply_attraction_forces()

void MayaFlux::Nodes::Network::PhysicsOperator::apply_attraction_forces ( )
private

Definition at line 521 of file PhysicsOperator.cpp.

522{
524
525 for (auto& group : m_collections) {
526 auto& points = group.collection->get_points();
527
528 for (size_t i = 0; i < points.size(); ++i) {
529 group.physics_state[i].force += field(points[i].position) * group.physics_state[i].mass;
530 }
531 }
532}
std::vector< glm::vec2 > * points
std::vector< CollectionGroup > m_collections
VectorField point_attractor(const glm::vec3 &anchor, float strength)
Radial attraction/repulsion toward an anchor point.

References m_attraction_point, m_attraction_strength, m_collections, MayaFlux::Kinesis::ForceFields::point_attractor(), and points.

Referenced by apply_forces().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: