Engine
TimeIntegrator Class Referenceabstract

An abstact base class for all grid based numerical ODE solvers for Newton's laws. More...

#include <time_integrator.h>

Inheritance diagram for TimeIntegrator:
BackwardEuler ExplicitEuler MidpointMethod SymplecticEuler Verlet

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
 

Detailed Description

An abstact base class for all grid based numerical ODE solvers for Newton's laws.

Member Function Documentation

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

Parameters
net_force_accumulatoraccumulates the net force acting on entity_ptr
entity_ptrslist of all the PhysicsEntities in the scene
entity_ptrpointer to the entity being updated

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