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

◆ apply_forces()

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

Definition at line 388 of file PhysicsOperator.cpp.

389{
390 for (auto& group : m_collections) {
391 for (auto& state : group.physics_state) {
392 state.force = m_gravity * state.mass;
393 }
394 }
395
398 }
399
400 if (m_turbulence_strength > 0.001F) {
402 }
403
406 }
407
408 if (!m_force_fields.empty()) {
409 for (auto& group : m_collections) {
410 auto& points = group.collection->get_points();
411
412 for (size_t i = 0; i < points.size(); ++i) {
413 for (const auto& field : m_force_fields) {
414 group.physics_state[i].force += field(points[i].position);
415 }
416 }
417 }
418 }
419}
glm::vec3 position
std::vector< CollectionGroup > m_collections
std::vector< Kinesis::VectorField > m_force_fields

References apply_attraction_forces(), apply_spatial_interactions(), apply_turbulence(), m_collections, m_force_fields, m_gravity, m_has_attraction_point, m_interaction_radius, m_spatial_interactions_enabled, m_turbulence_strength, and position.

Referenced by process().

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