Biomechanical Joint Model
 Author: Anderson Maciel

comesimulator.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2000 by Anderson Maciel                                 *
00003  *   andi.maciel@gmail.com                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  **************************************************************************/
00020 
00031 
00032 
00033 #ifndef __COME_SIMULATOR_H
00034 #define __COME_SIMULATOR_H
00035 
00036 #include        <general/come.h>
00037 #include        <gui/comeview.h>
00038 
00039 //#include      <zthread/Thread.h>
00040 
00041 #ifndef __COME_SCENARIO_H       
00042 class COME_Scenario;
00043 #endif
00044 
00045 //class QThread{};
00046 #include        <qthread.h>
00047 
00048 /*
00049 INCPATH  = -I/usr/lib/qt3/mkspecs/default -I. -I../../biomodel -I$(QTDIR)/include -I/usr/X11R6/include -I/usr/X11R6/include
00050 LINK     = g++
00051 LFLAGS   = 
00052 LIBS     = $(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -L/usr/X11R6/lib /home/amaciel/development/biomodel/general/libgeneral.a /home/amaciel/development/biomodel/physics/libphysics.a /home/amaciel/development/biomodel/VCOLLIDE/RAPID/libRapid.a /home/amaciel/development/biomodel/VCOLLIDE/libVCollide.a /home/amaciel/development/biomodel/kinematics/libkinematics.a /home/amaciel/development/biomodel/gui/libgui.a /home/amaciel/development/biomodel/bio/libbio.a /home/amaciel/development/biomodel/algebra/libalgebra.a /usr/lib/libZThread.so /usr/lib/libxerces-c.so /usr/local/lib/libQGLViewer.so /usr/X11R6/lib/libglut.so -lqt-mt -lGLU -lGL -lXmu -lXext -lX11 -lm -lpthread
00053 */
00054 
00055 class COME_Simulator : public COME, public QThread { //QThread {//ZThread::Runnable {
00056 
00057 protected:
00058         double  FPS;
00059         double  timestep;
00060         double  duration;
00061         double  sim_clock;
00062         int     type;           // online/offline
00063         bool    bStop;          //stop simulation
00064         bool    bPause;         //pause simulation
00065         bool    running;        // set when the thread is running
00066 
00067         int     whenRecalculate;
00068         int     howRecalculate;
00069         
00070         COME_Scenario   *scene; // 
00071 
00072 public:
00073         COME_Simulator();
00074         COME_Simulator( COME_Scenario *sceneN, COME_View *viewN );
00075         COME_Simulator( string fileName, vector<string> organFiles );
00076         virtual ~COME_Simulator();
00077 
00078         virtual void run();
00079 
00080         void    setFPS( double fpsN );
00081         void    setTimestep( double timestepN );
00082         void    setClock( double clockN );
00083         void    setDuration( double durationN );
00084         void    setScene( COME_Scenario *sceneN );
00085         void    setStop( bool bStopN );
00086         void    setPause( bool bPauseN );
00087         void    setWhenRecalculate( int when );
00088         void    setHowRecalculate( int how );
00089         void    setType( int ty );
00090         
00091 
00092         double          getFPS() const;
00093         double          getTimestep() const;
00094         double          getClock() const;
00095         double          getDuration() const;
00096         COME_Scenario*  getScene() const;
00097         bool            getPause() const;
00098         bool            getStop() const;
00099         bool            isRunning() const;
00100         int             getWhenRecalculate();
00101         int             getHowRecalculate();
00102         int             getType();
00103         
00104         double difKinematics; 
00105         double difCollisions; 
00106         double difDeformation; 
00107 
00108 
00109 };
00110 
00111 #endif // __COME_SIMULATOR_H

Generated on Thu Dec 1 10:13:36 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5