#ifndef __ODEMIDPOINT_H__ #define __ODEMIDPOINT_H__ /*************************************************************************** File: ODEMidpoint.h Created: 08/22/2001 Author: Maxim Garber Computer Science Department University of North Carolina - Chapel Hill garber@cs.unc.edu Description: Implements the midpoint method (Runge-Kutta 2/3) ODE solver. ----------------------------------------------------------------------------. Copyright 2001 Maxim Garber UNC Motion Planning Research Group *****************************************************************************/ #include "ODESolver.h" #include "ODEEuler.h" #include "Singleton.h" // forward declaration class ODEMidpoint; // singleton typedef. typedef Singleton MidpointSolver; class ODEMidpoint : public ODESolver { public: // sets the system used for evaluating the function derivative virtual void SetSystem(ODESystem* system); // calls the ODE solver to intergrate the system given a configuration and a timestep // - returns the resulting configuration virtual void Integrate(const ODEConfig& config, float time, float timeStep, ODEConfig& newConfig); protected: // protected for singleton use only ODEMidpoint(){EulerSolver::Instantiate();} ~ODEMidpoint(){} }; #endif //__ODEMIDPOINT_H__