Biomechanical Joint Model
 Author: Anderson Maciel

COME_Scenario Class Reference

#include <comescenario.h>

Inherits COME.

Inheritance diagram for COME_Scenario:

Inheritance graph
[legend]
Collaboration diagram for COME_Scenario:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 COME_Scenario ()
virtual ~COME_Scenario ()
void setPatientList (list< COME_Patient * > &listN)
void setGravity (const COME_Vector3D &gravityN)
COME_PatientgetPatient (int index) const
const COME_Vector3D getGravity () const
list< COME_Patient * > * getPatientList ()
COME_CollidegetCollisionDetector () const
vector< COME_Material * > * getAvailableMaterialsList () const
bool simulate (double timestep, double simClock, bool direction)
bool loadFile (string file_name, COME_Simulator *simulator)
bool saveFile (string file_name, COME_Simulator *simulator)
void saveJointIntoFile (COME_Joint *jointAux, int fileMode)
void createPrecalculatedFiles ()
bool loadOrganMesh (string organFile, int type, double scaleFactor=1.0)
bool addOrganFromFile (string file_name, COME_Simulator *simulator)
bool addMaterialsFromFile (string file_name, COME_Simulator *simulator)
void getEnvelop (COME_Point3D &mins, COME_Point3D &maxs) const
void initializeAllHashs ()

Public Attributes

COME_Movementmovement
 m/s**2

Protected Attributes

list< COME_Patient * > patientList
COME_Collidecollisions
vector< COME_Material * > * availableMaterials
COME_Vector3D gravity

Detailed Description

Definition at line 60 of file comescenario.h.


Constructor & Destructor Documentation

COME_Scenario::COME_Scenario  ) 
 

Definition at line 62 of file comescenario.cpp.

References accu, availableMaterials, collisions, gravity, COME::modified, movement, COME::mutex, and patientList.

COME_Scenario::~COME_Scenario  )  [virtual]
 

Definition at line 75 of file comescenario.cpp.


Member Function Documentation

bool COME_Scenario::addMaterialsFromFile string  file_name,
COME_Simulator simulator
 

This method add all materials from a given file. Such file is in XML format and "comepatient.dtd" keeps its sintaxe definition.

Definition at line 544 of file comescenario.cpp.

References availableMaterials, COME_Xml::getAllMaterials(), COME_Xml::loadMaterialsFile(), and patientList.

Referenced by COME_Mechatester::COME_Mechatester().

Here is the call graph for this function:

bool COME_Scenario::addOrganFromFile string  file_name,
COME_Simulator simulator
 

This method adds an organ rt the first patient from a description file. Such file is in XML format and "comepatient.dtd" keeps its sintaxe definition.

Definition at line 510 of file comescenario.cpp.

References COME_Patient::addOrgan(), availableMaterials, getPatient(), COME_MoleculesCartilage::getTissue(), COME_Xml::loadOrganFile(), COME::modified, COME::parent, patientList, COME_MoleculesTissue::setMoleculesMaterial(), and COME_Simulator::setScene().

Referenced by COME_Mechatester::fileOpen().

Here is the call graph for this function:

void COME_Scenario::createPrecalculatedFiles  ) 
 

This method initializes all files for precalculation

Definition at line 362 of file comescenario.cpp.

References COME_MoleculesCartilage::getTissue(), NEW, patientList, and COME_MoleculesTissue::saveDeformationFile().

Referenced by COME_ModelJoint::exportPrecalculationChanged().

Here is the call graph for this function:

vector< COME_Material * > * COME_Scenario::getAvailableMaterialsList  )  const
 

Definition at line 131 of file comescenario.cpp.

References availableMaterials.

Referenced by COME_Mechatester::clickedDelMaterial(), COME_Mechatester::clickedNewMaterial(), COME_Mechatester::selectMaterial(), and COME_Mechatester::updateMaterialsList().

COME_Collide * COME_Scenario::getCollisionDetector  )  const
 

Definition at line 125 of file comescenario.cpp.

References collisions.

Referenced by COME_ModelJoint::changedCollisionTreatment(), and COME_ModelJoint::fileLoad_scene().

void COME_Scenario::getEnvelop COME_Point3D mins,
COME_Point3D maxs
const
 

This method inspects the envelops of all patients within the scene and sets the parameters mins and maxs to the minimum and maximum corners of the rectangular scene envelop.

Definition at line 739 of file comescenario.cpp.

References COME_Point3D::getX(), COME_Point3D::getY(), COME_Point3D::getZ(), patientList, COME_Point3D::setX(), COME_Point3D::setY(), and COME_Point3D::setZ().

Here is the call graph for this function:

const COME_Vector3D COME_Scenario::getGravity  )  const
 

Definition at line 119 of file comescenario.cpp.

References gravity.

Referenced by COME_Xml::exportIntegrationFile(), and COME_Xml::saveSceneFile().

COME_Patient * COME_Scenario::getPatient int  index  )  const
 

Getting

Definition at line 99 of file comescenario.cpp.

References patientList.

Referenced by addOrganFromFile(), COME_Mechatester::clickedAssociate(), COME_Mechatester::clickedCheck(), COME_Mechatester::clickedReset(), COME_Mechatester::clickedStartSim(), COME_Mechatester::COME_Mechatester(), COME_DiscretizerQGLWidget::draw(), COME_ModelJoint::fileLoad_scene(), COME_Mechatester::fileOpen(), COME_Discretizer::fileOpen(), initializeAllHashs(), COME_ModelJointQGLWidget::loadTextures(), COME_ModelJointQGLWidget::postSelection(), COME_MechatestQGLWidget::postSelection(), COME_ModelJoint::rotateSelected(), COME_Mechatester::rotateSelected(), COME_ModelJoint::scaleSelected(), COME_Mechatester::scaleSelected(), simulate(), COME_ModelJoint::sliderNominalReleased(), COME_ModelJoint::translateSelected(), COME_Mechatester::translateSelected(), COME_Mechatester::updateClampIntersections(), COME_Mechatester::updateEquation(), and COME_Discretizer::updateSampling().

list< COME_Patient * > * COME_Scenario::getPatientList  ) 
 

Definition at line 113 of file comescenario.cpp.

References patientList.

Referenced by exportData(), COME_ModelJoint::fileLoad_scene(), loadData(), and COME_ModelJointQGLWidget::loadTextures().

void COME_Scenario::initializeAllHashs  ) 
 

Run all organs and create hash tables when needed

Definition at line 495 of file comescenario.cpp.

References COME::getDescription(), COME_Patient::getOrgan(), getPatient(), COME_Patient::getPtOrganList(), and COME_BioStructure::initializeHashStructureRayCasting().

Referenced by COME_ModelJoint::changedCollisionTreatment().

Here is the call graph for this function:

bool COME_Scenario::loadFile string  file_name,
COME_Simulator simulator
 

This method creates patients and simulation parameters from a description file. Such file is in XML format and "comepatient.dtd" keeps its sintaxe definition.

create interior lists for organs collisions

Definition at line 456 of file comescenario.cpp.

References availableMaterials, COME_Xml::getAllMaterials(), COME_Xml::loadSceneFile(), and patientList.

Referenced by COME_ModelJoint::fileLoad_scene().

Here is the call graph for this function:

bool COME_Scenario::loadOrganMesh string  organFile,
int  type,
double  scaleFactor = 1.0
 

Deprecated Remove this function (comment date: 07/05/2004

Definition at line 669 of file comescenario.cpp.

References BONE, CARTILAGE, CLAMP, LIGAMENT, and COME_BioStructure::setFixed().

Referenced by COME_Mechatester::COME_Mechatester(), and COME_Discretizer::fileOpen().

Here is the call graph for this function:

bool COME_Scenario::saveFile string  file_name,
COME_Simulator simulator
 

This method saves patients and simulation parameters to a description file. Such file is in XML format and "comepatient.dtd" keeps its sintaxe definition.

Definition at line 565 of file comescenario.cpp.

References patientList, and COME_Xml::saveSceneFile().

Referenced by COME_ModelJoint::fileExportAs(), COME_Mechatester::fileExportAs(), and COME_Discretizer::fileExportAs().

Here is the call graph for this function:

void COME_Scenario::saveJointIntoFile COME_Joint jointAux,
int  fileMode
 

This method saves the current status of all joints of the hierarchy from jointAux into their respective file It stores the transformation the joint represent in the file. In other words, export all joint's LIMs to files such that one can play the motion afterwards

Definition at line 390 of file comescenario.cpp.

References COME::baseFolder, COME_Joint::getDescription(), and NEW.

Here is the call graph for this function:

void COME_Scenario::setGravity const COME_Vector3D gravityN  ) 
 

Definition at line 90 of file comescenario.cpp.

References gravity.

Referenced by COME_Xml::loadSceneFile().

void COME_Scenario::setPatientList list< COME_Patient * > &  listN  ) 
 

Setting

Definition at line 84 of file comescenario.cpp.

References patientList.

bool COME_Scenario::simulate double  timestep,
double  simClock,
bool  direction
 

This method changes the state of the scenario to a state distant of the current one of 1 timestep in the future or past depending of the direction value. Note that in the case when more than one patient exists, only the last inserted will be simulated.

Apply physics and deformation

Definition at line 143 of file comescenario.cpp.

References ADDUCT, FLEX, COME_Patient::getJointByName(), COME_JointMotion::getJointName(), COME_JointMotion::getMotionType(), COME_JointMotion::getParameter(), getPatient(), COME_Movement::getQtdMotion(), COME_Movement::getTime_Err(), COME_JointMotion::getTimeFin(), COME_JointMotion::getTimeIni(), COME_Movement::getTimeline(), movement, patientList, COME_JointMotion::setDeltaS(), COME_Movement::setTime_Err(), and TWIST.

Referenced by COME_Simulator::run().

Here is the call graph for this function:


Member Data Documentation

vector<COME_Material*>* COME_Scenario::availableMaterials [protected]
 

Definition at line 66 of file comescenario.h.

Referenced by addMaterialsFromFile(), addOrganFromFile(), COME_Scenario(), getAvailableMaterialsList(), and loadFile().

COME_Collide* COME_Scenario::collisions [protected]
 

Definition at line 64 of file comescenario.h.

Referenced by COME_Scenario(), and getCollisionDetector().

COME_Vector3D COME_Scenario::gravity [protected]
 

Definition at line 67 of file comescenario.h.

Referenced by COME_Scenario(), getGravity(), and setGravity().

COME_Movement* COME_Scenario::movement
 

m/s**2

Definition at line 73 of file comescenario.h.

Referenced by COME_Scenario(), COME_Xml::exportIntegrationFile(), and simulate().

list<COME_Patient*> COME_Scenario::patientList [protected]
 

Definition at line 63 of file comescenario.h.

Referenced by addMaterialsFromFile(), addOrganFromFile(), COME_Scenario(), createPrecalculatedFiles(), getEnvelop(), getPatient(), getPatientList(), loadFile(), saveFile(), setPatientList(), and simulate().


The documentation for this class was generated from the following files:
Generated on Thu Dec 1 10:14:28 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5