Biomechanical Joint Model
 Author: Anderson Maciel

comedof.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 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.....: 
00024 //  RESPONSIBLE.: 
00025 //
00026 //  FILE........: COME_Dof.h
00027 //  DESCRIPTION.: Contain the COME_Dof class declarations.
00028 //
00029 //  AUTHOR......: Anderson Maciel
00030 //  DATE........: 23/February/2001
00031 //  DESCRIPTION.: Class and new methods declaration.
00032 //
00034 
00035 #ifndef __COME_DOF_H
00036 #define __COME_DOF_H
00037 
00038 #ifndef __COME_JOINT_H
00039 class COME_Joint;
00040 #endif
00041 
00042 #ifndef __COME_MODIFIER_H
00043 class COME_Modifier;
00044 #endif
00045 
00046 #include        <algebra/comepoint3d.h>
00047 #include        <algebra/comevector3d.h>
00048 #include        <algebra/comematrix.h>
00049 #include        <algebra/comebezier.h>
00050 //#include      <string>
00051 //using namespace std;
00052 
00053 
00054 //-----------------------------------------------------------------------
00055 // V P D O F
00056 //-----------------------------------------------------------------------
00057 
00059 // Class Name: COME_Dof
00060 // Superclass: none
00061 // Subclass: none
00062 
00063 
00064 class COME_Dof {
00065 
00066         private:
00067                 string          description;// Name of the Dof; often related to the dof's type of motion
00068                 COME_Point3D position;          // Position of the dof related to the parent reference system
00069                 COME_Vector3D axis;                     // Arbitrary axis of rotation
00070                 COME_Bezier     *evoluta;               // 3D path related to the axis position along its rotation
00071                 COME_Matrix     lim;                            // Local Instance Matrix
00072                 COME_Matrix     bim;                            // Base Instance Matrix
00073                 float           minAngle;                       // Min base angle in rad.
00074                 float           maxAngle;                       // Max base angle in rad.
00075                 float           currentMinAngle;                        // Min angle in rad currently valid.
00076                 float           currentMaxAngle;                        // Max angle in rad currently valid.
00077                 float           comfortMinAngle;                        // Min angle in rad for comfortable position.
00078                 float           comfortMaxAngle;                        // Max angle in rad for comfortable position.
00079                 COME_Modifier   *rangeModifier;         // Entity used to change the motion range along motion.
00080                 float           currentPosition;        //A real number from 0 to 1
00081                 float           restPosition;                   //Another real number from 0 to 1
00082                 COME_Joint      *ownerJoint;                    //Reference to the joint where this dof is set up
00083         
00084         protected:
00085                 
00086         public:
00087                 COME_Dof();
00088                 COME_Dof( COME_Vector3D za, COME_Point3D pos, COME_Bezier *evol );
00089                 COME_Dof( COME_Vector3D za, COME_Point3D pos, COME_Curve *evol,
00090                                                 float min, float max, float cur, float rest );
00091                 COME_Dof( COME_Vector3D za, COME_Point3D pos, COME_Bezier *evol,
00092                                                 float min, float max, float cur, float rest, COME_Modifier *rm );
00093                 //~COME_Dof();  
00094                 void    setDescription( char* );
00095                 void    setDescription( string );
00096                 void    setComfortMin( float );
00097                 void    setComfortMax( float );
00098                 string                  getDescription();
00099                 COME_Vector3D   getAxis( void );
00100                 COME_Point3D            getOrigin( void );
00101                 COME_Point3D            getPosition( void );
00102                 COME_Curve                      getEvoluta( void );
00103                 COME_Matrix             getLim( void );
00104                 COME_Matrix             getBim( void );
00105                 float                           getMin( void );
00106                 float                           getMax( void );
00107                 float                           getCurrentMin( void );
00108                 float                           getCurrentMax( void );
00109                 float                           getComfortMin( void );
00110                 float                           getComfortMax( void );
00111                 float                           getCurrent( void );
00112                 float                           getRest( void );
00113                 COME_Joint*             getOwnerJoint( void );
00114                 void                            setEvoluta( COME_Bezier *evol );
00115                 void                            setLim( COME_Matrix m );
00116                 void                            setAxis( COME_Vector3D v );
00117                 void                            setMin( float min );
00118                 void                            setMax( float max );
00119                 void                            setOwnerJoint( COME_Joint *ow );
00120                 void                            vpMoveTo( float pos );
00121                 void                            setRest( float rest );
00122                 void                            vpRest( void );
00123                 void                            setRangeModifier( COME_Modifier *m );
00124                 COME_Modifier*  getRangeModifier( void );
00125                 void                            vpPrintLim( void );
00126 };
00127 
00128 #endif

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