Biomechanical Joint Model
 Author: Anderson Maciel

comescenario.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 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 
00022 //
00023 //  PROJECT.....: CO-ME
00024 //  RESPONSIBLE.: 
00025 //
00026 //  FILE........: comescenario.h
00027 //  DESCRIPTION.: 
00028 //                                 
00029 //
00030 //  AUTHOR......: Anderson Maciel
00031 //  DATE........: June/05/2002
00032 //  DESCRIPTION.: Class declaration.
00033 //
00035 
00036 #ifndef __COME_SCENARIO_H       
00037 #define __COME_SCENARIO_H       
00038 
00039 #ifndef __COMECOLLIDE_H
00040 class COME_Collide;
00041 #endif
00042 
00043 #ifndef __COME_SIMULATOR_H      
00044 class COME_Simulator;
00045 #endif
00046 
00047 #ifndef __COME_MOVEMENT_H       
00048 class COME_Movement;
00049 #endif
00050 
00051 
00052 #include        <general/come.h>
00053 #include        <bio/comepatient.h>
00054 #include        <physics/comeforce.h>
00055 #include        <bio/comematerial.h>
00056 #include        <algebra/comevector3d.h>
00057 //#include      <physics/comecollide.h>
00058 
00059 
00060 class COME_Scenario : public COME {
00061 
00062 protected:
00063         list<COME_Patient*>     patientList;
00064         COME_Collide*           collisions;
00065 
00066         vector<COME_Material*>* availableMaterials;
00067         COME_Vector3D           gravity;                        
00068 
00069         
00070         
00071 public:
00072 
00073         COME_Movement*          movement;
00074 
00075         COME_Scenario();
00076         virtual ~COME_Scenario();
00077         
00078         void    setPatientList( list<COME_Patient*> &listN );
00079         void    setGravity( const COME_Vector3D &gravityN );
00080 
00081         COME_Patient    *getPatient( int index ) const;
00082         const COME_Vector3D     getGravity() const;
00083         list<COME_Patient*>*    getPatientList();
00084         COME_Collide*           getCollisionDetector() const;
00085         vector<COME_Material*>* getAvailableMaterialsList() const;
00086 
00087         bool    simulate( double timestep, double simClock, bool direction );
00088         bool    loadFile( string file_name, COME_Simulator *simulator );
00089         bool    saveFile( string file_name, COME_Simulator *simulator );
00090         void    saveJointIntoFile( COME_Joint *jointAux, int fileMode );
00091         void    createPrecalculatedFiles();
00092         //bool  loadOrgans( vector<string> organFiles, int mode ); deprecated
00093         bool    loadOrganMesh( string organFile, int type, double scaleFactor = 1.0 );
00094         bool    addOrganFromFile( string file_name, COME_Simulator *simulator );
00095         bool    addMaterialsFromFile( string file_name, COME_Simulator *simulator );
00096         void    getEnvelop( COME_Point3D& mins, COME_Point3D& maxs ) const ;
00097         void    initializeAllHashs();
00098 
00099 };
00100 
00101 #endif // __COME_SCENARIO_H

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