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 476 of file PhysicsOperator.cpp.

477{
479
480 for (auto& group : m_collections) {
481 auto& points = group.collection->get_points();
482
483 for (size_t i = 0; i < points.size(); ++i) {
484 group.physics_state[i].force += field(points[i].position) * group.physics_state[i].mass;
485 }
486 }
487}
glm::vec3 position
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 position.

Referenced by apply_forces().

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