ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::DynamicsSystem Class Reference

This class is responsible to compute and update the dynamics of the bodies that are simulated using physics. More...

#include <include/reactphysics3d/systems/DynamicsSystem.h>

Public Member Functions

 DynamicsSystem (PhysicsWorld &world, BodyComponents &bodyComponents, RigidBodyComponents &rigidBodyComponents, TransformComponents &transformComponents, ColliderComponents &colliderComponents, bool &isGravityEnabled, Vector3 &gravity)
 Constructor.
 
 ~DynamicsSystem ()=default
 Destructor.
 
void integrateRigidBodiesPositions (decimal timeStep, bool isSplitImpulseActive)
 Integrate the positions and orientations of rigid bodies.
 
void integrateRigidBodiesVelocities (decimal timeStep)
 Integrate the velocities of rigid bodies.
 
void updateBodiesState ()
 Update the postion/orientation of the bodies.
 
void resetBodiesForceAndTorque ()
 Reset the external force and torque applied to the bodies.
 
void resetSplitVelocities ()
 Reset the split velocities of the bodies.
 

Detailed Description

This class is responsible to compute and update the dynamics of the bodies that are simulated using physics.

Member Function Documentation

◆ integrateRigidBodiesPositions()

void DynamicsSystem::integrateRigidBodiesPositions ( decimal  timeStep,
bool  isSplitImpulseActive 
)

Integrate the positions and orientations of rigid bodies.

The positions and orientations of the bodies are integrated using the sympletic Euler time stepping scheme.

◆ integrateRigidBodiesVelocities()

void DynamicsSystem::integrateRigidBodiesVelocities ( decimal  timeStep)

Integrate the velocities of rigid bodies.

This method only set the temporary velocities but does not update the actual velocitiy of the bodies.

The velocities updated in this method might violate the constraints and will be corrected in the constraint and contact solver.


The documentation for this class was generated from the following files: