Engine
|
An abstact base class for all grid based numerical ODE solvers for Newton's laws. More...
#include <time_integrator.h>
Public Member Functions | |
void | StepForward (const NetForceAccumulator &net_force_accumulator, const std::vector< std::shared_ptr< PhysicsEntity >> &entity_ptrs, const std::shared_ptr< PhysicsEntity > entity_ptr) |
GLfloat | GetStepSize () |
Protected Attributes | |
GLfloat | m_dt |
An abstact base class for all grid based numerical ODE solvers for Newton's laws.
GLfloat TimeIntegrator::GetStepSize | ( | ) |
Returns the current step size for the integrator
void TimeIntegrator::StepForward | ( | const NetForceAccumulator & | net_force_accumulator, |
const std::vector< std::shared_ptr< PhysicsEntity >> & | entity_ptrs, | ||
const std::shared_ptr< PhysicsEntity > | entity_ptr | ||
) |
Public interface for all solvers. Computes position and velocity updates by solving Newton's equations of motion. Updates entity_ptr buffers with next predicted position and velocity
net_force_accumulator | accumulates the net force acting on entity_ptr |
entity_ptrs | list of all the PhysicsEntities in the scene |
entity_ptr | pointer to the entity being updated |