Biomechanical Joint Model
 Author: Anderson Maciel

comemoleculesbone.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 //  AUTHOR......: Anderson Maciel
00027 //  DATE........: October/24/2002
00028 //  DESCRIPTION.: Class declaration.
00029 //
00031 
00032 #ifndef __COME_MOLECULESBONE_H  
00033 #define __COME_MOLECULESBONE_H  
00034 
00035 
00036 
00037 #include <bio/comemoleculestissue.h>
00038 #include <bio/comebone.h>
00039 #include <algebra/comematrix.h>
00040 
00041 
00046 
00047 class COME_MoleculesBone : public COME_Bone {
00048 
00049 protected:
00050 
00051         COME_MoleculesTissue    *tissue;
00052         COME_Matrix                             rotationMatrix;
00053         COME_Matrix                             inertiaTensor;
00054         COME_Point3D                            massCenter;
00055         COME_Vector3D                           linearVelocity;
00056         COME_Vector3D                           angularVelocity;
00057 
00058 public:
00059 
00060         COME_MoleculesBone();
00061         ~COME_MoleculesBone();
00062 
00063         void    setTissue( COME_MoleculesTissue *tissueN );
00064         void    setMassCenter( const COME_Point3D& massC );
00065 
00066         COME_MoleculesTissue    *getTissue();
00067         COME_Point3D                            getMassCenter() const;
00068 
00069         void    getEnvelop( COME_Point3D& mins, COME_Point3D& maxs );
00070 
00071         void    updateInertiaTensor( double discretization );
00072         void    updateMassCenter();
00073         bool    update( double timestep, double simClock );
00074         void    updateSurface( bool regenerate );
00075         void    updateSurface( double skinSphere, double stiff, double resolution );
00076         void    updateSkin();
00077         
00078         void    generateEnvelopSurface();
00079         void    initializeSkinning();
00080         void    respondCollision();
00081 
00082         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 );
00083 
00084 
00085 };
00086 
00087 #endif // __COME_MOLECULESBONE_H

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