Biomechanical Joint Model
 Author: Anderson Maciel

COME_MoleculesBone Class Reference

#include <comemoleculesbone.h>

Inherits COME_Bone.

Inheritance diagram for COME_MoleculesBone:

Inheritance graph
[legend]
Collaboration diagram for COME_MoleculesBone:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 COME_MoleculesBone ()
 ~COME_MoleculesBone ()
void setTissue (COME_MoleculesTissue *tissueN)
void setMassCenter (const COME_Point3D &massC)
COME_MoleculesTissuegetTissue ()
COME_Point3D getMassCenter () const
void getEnvelop (COME_Point3D &mins, COME_Point3D &maxs)
void updateInertiaTensor (double discretization)
void updateMassCenter ()
bool update (double timestep, double simClock)
void updateSurface (bool regenerate)
void updateSurface (double skinSphere, double stiff, double resolution)
void updateSkin ()
void generateEnvelopSurface ()
void initializeSkinning ()
void respondCollision ()
void derivs (double currTime, double timestep, COME_Point3D *X, COME_Vector3D *L, COME_Vector3D *P, COME_Matrix *R, COME_Vector3D *V, COME_Vector3D *F, COME_Vector3D *T, COME_Vector3D *W)

Protected Attributes

COME_MoleculesTissuetissue
COME_Matrix rotationMatrix
COME_Matrix inertiaTensor
COME_Point3D massCenter
COME_Vector3D linearVelocity
COME_Vector3D angularVelocity

Detailed Description

This class is an implementation of bones based on a molecular system.

Definition at line 47 of file comemoleculesbone.h.


Constructor & Destructor Documentation

COME_MoleculesBone::COME_MoleculesBone  ) 
 

Constructors and destructors.

Definition at line 49 of file comemoleculesbone.cpp.

References COME_BioStructure::collisionRadius, COME_BioStructure::globalHooke, COME_BioStructure::hashTable, COME::setParent(), COME_BioStructure::surface, tissue, and updateMassCenter().

Here is the call graph for this function:

COME_MoleculesBone::~COME_MoleculesBone  ) 
 

Definition at line 60 of file comemoleculesbone.cpp.


Member Function Documentation

void COME_MoleculesBone::derivs double  currTime,
double  timestep,
COME_Point3D X,
COME_Vector3D L,
COME_Vector3D P,
COME_Matrix R,
COME_Vector3D V,
COME_Vector3D F,
COME_Vector3D T,
COME_Vector3D W
 

This method derivs the two sets of variables positions and velocities into the two new sets velocities and accelerations. It calls the protected method calculateForce() to compute the final force being applied on this molecule and apply Newton's laws to calculate the resultant acceleration and the final velocity.

Definition at line 398 of file comemoleculesbone.cpp.

References COME_Matrix::getInverse(), COME_MoleculesTissue::getMass(), COME_Matrix::getTransposed(), inertiaTensor, COME_BioStructure::isFixed(), COME_Vector3D::setVector3D(), and tissue.

Here is the call graph for this function:

void COME_MoleculesBone::generateEnvelopSurface  ) 
 

This method re-generates the boundary mesh of the bone for visualization. Such mesh is the rectangular envelop for the organ shape.

Definition at line 202 of file comemoleculesbone.cpp.

References COME_Mesh::addFaceAsIndices(), COME_Mesh::addVertex(), getEnvelop(), COME_Point3D::getX(), COME_Point3D::getY(), COME_Point3D::getZ(), COME_Mesh::resetMesh(), COME_Vertex3D::setNormal(), and COME_BioStructure::surface.

Here is the call graph for this function:

void COME_MoleculesBone::getEnvelop COME_Point3D mins,
COME_Point3D maxs
[virtual]
 

This method returns the 3D rectangular envelop of this organ.

Implements COME_BioStructure.

Definition at line 281 of file comemoleculesbone.cpp.

References COME_MoleculesTissue::getEnvelop(), and tissue.

Referenced by generateEnvelopSurface(), updateInertiaTensor(), and updateSurface().

Here is the call graph for this function:

COME_Point3D COME_MoleculesBone::getMassCenter  )  const
 

Definition at line 87 of file comemoleculesbone.cpp.

References massCenter.

COME_MoleculesTissue * COME_MoleculesBone::getTissue  )  [virtual]
 

Implements COME_Bone.

Definition at line 81 of file comemoleculesbone.cpp.

References tissue.

void COME_MoleculesBone::initializeSkinning  ) 
 

This method only generates the normals on the surface of the bone.

Definition at line 470 of file comemoleculesbone.cpp.

References COME_BioStructure::getSurface(), IMPLICIT, COME::setParent(), COME_BioStructure::surface, and updateSurface().

Here is the call graph for this function:

void COME_MoleculesBone::respondCollision  )  [virtual]
 

Implements COME_BioStructure.

Definition at line 487 of file comemoleculesbone.cpp.

void COME_MoleculesBone::setMassCenter const COME_Point3D massC  ) 
 

Definition at line 75 of file comemoleculesbone.cpp.

References massCenter.

void COME_MoleculesBone::setTissue COME_MoleculesTissue tissueN  ) 
 

Protected attributes access methods.

Definition at line 69 of file comemoleculesbone.cpp.

References tissue.

bool COME_MoleculesBone::update double  timestep,
double  simClock
[virtual]
 

This method implements the Runge-Kutta 4 method for numeric integration to calculate the new positions for all molecules of this organ.

Implements COME_Bone.

Definition at line 297 of file comemoleculesbone.cpp.

References updateSkin().

Here is the call graph for this function:

void COME_MoleculesBone::updateInertiaTensor double  discretization  ) 
 

This method calculates the inertia tensor for this bone based on its mesh volume and stores it in the inertiaTensor attribute. The parameter discretization defines the sample size as a fraction of the bounding box.

Definition at line 418 of file comemoleculesbone.cpp.

References getEnvelop(), COME_Matrix::getValueAt(), COME_Point3D::getX(), COME_Point3D::getY(), COME_Point3D::getZ(), inertiaTensor, COME_Mesh::isInside(), COME_Matrix::reset(), COME_Matrix::setValueAt(), and COME_BioStructure::surface.

Here is the call graph for this function:

void COME_MoleculesBone::updateMassCenter  ) 
 

This method calculates the center of mass for this bone based on its molecules distribution and density. Then it stores it in the massCenter attribute.

Definition at line 461 of file comemoleculesbone.cpp.

References COME_MoleculesTissue::getMassCenter(), massCenter, and tissue.

Referenced by COME_MoleculesBone().

Here is the call graph for this function:

void COME_MoleculesBone::updateSkin  )  [virtual]
 

Implements COME_BioStructure.

Definition at line 94 of file comemoleculesbone.cpp.

References COME_BioStructure::surface, and COME_Mesh::updateSkin().

Referenced by update().

Here is the call graph for this function:

void COME_MoleculesBone::updateSurface double  skinSphere,
double  stiff,
double  resolution
 

This method re-generates the boundary mesh of the bone for visualization. Such mesh is an implicit surface that surrounds the organ shape.

Definition at line 138 of file comemoleculesbone.cpp.

void COME_MoleculesBone::updateSurface bool  regenerate  )  [virtual]
 

This method re-generates the boundary mesh of the cartilage for visualization.

Implements COME_Bone.

Definition at line 103 of file comemoleculesbone.cpp.

References COME_Mesh::estabilishLinkVerticesFaces(), getEnvelop(), COME_MoleculesTissue::getRadiusAverage(), COME_BioStructure::surface, tissue, and COME_BioStructure::volume.

Referenced by initializeSkinning().

Here is the call graph for this function:


Member Data Documentation

COME_Vector3D COME_MoleculesBone::angularVelocity [protected]
 

Definition at line 56 of file comemoleculesbone.h.

COME_Matrix COME_MoleculesBone::inertiaTensor [protected]
 

Definition at line 53 of file comemoleculesbone.h.

Referenced by derivs(), and updateInertiaTensor().

COME_Vector3D COME_MoleculesBone::linearVelocity [protected]
 

Definition at line 55 of file comemoleculesbone.h.

COME_Point3D COME_MoleculesBone::massCenter [protected]
 

Definition at line 54 of file comemoleculesbone.h.

Referenced by getMassCenter(), setMassCenter(), and updateMassCenter().

COME_Matrix COME_MoleculesBone::rotationMatrix [protected]
 

Definition at line 52 of file comemoleculesbone.h.

COME_MoleculesTissue* COME_MoleculesBone::tissue [protected]
 

Definition at line 51 of file comemoleculesbone.h.

Referenced by COME_MoleculesBone(), derivs(), getEnvelop(), getTissue(), setTissue(), updateMassCenter(), and updateSurface().


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