00001 00003 // 00004 // -= ODE solver base class =- 00005 // 00006 // Definition: "base class for all ordinary differential equation solvers" 00007 // 00009 // 00010 // $RCSfile: ODEsolver.h,v $ 00011 // $Date: 2002/01/10 03:10:47 $ 00012 // $Revision: 1.3 $ 00013 // Copyright (C) 1998, 1999, 2000 Kevin Meinert, kevin@vrsource.org 00014 // 00015 // This library is free software; you can redistribute it and/or 00016 // modify it under the terms of the GNU Library General Public 00017 // License as published by the Free Software Foundation; either 00018 // version 2 of the License, or (at your option) any later version. 00019 // 00020 // This library is distributed in the hope that it will be useful, 00021 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00023 // Library General Public License for more details. 00024 // 00025 // You should have received a copy of the GNU Library General Public 00026 // License along with this library; if not, write to the Free 00027 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 // 00030 #ifndef ODE_SOLVER 00031 #define ODE_SOLVER 00032 00033 #include "ani/Dynamics/ODEsolver.h" 00034 00035 namespace ani 00036 { 00037 // ordinary differential equation solver. 00038 template <class _item> 00039 class ODEsolver 00040 { 00041 public: 00042 ODEsolver() {} 00043 virtual ~ODEsolver() {} 00044 00045 // give: 00046 // currentState = current state of the item 00047 // currentTime = current time of the item 00048 // timeDelta = current stepsize (t(n) - t(n+1)) == time delta 00049 // returns: 00050 // currentState = x(t0 + h) == the next state of the item after taking this step... 00051 virtual void exec( _item& currentState, float timeDelta ) 00052 { 00053 } 00054 }; 00055 } 00056 00057 00058 #endif