Biomechanical Joint Model
 Author: Anderson Maciel

comebiaxialjoint.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2000 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.....: vpat - Creating Virtual Patients
00024 //  RESPONSIBLE.: Carla Freitas e Luciana Nedel
00025 //
00026 //  FILE........: vpbiaxialjoint.cpp
00027 //  DESCRIPTION.: Contain the COME_BiaxialJoint class definitions.
00028 //
00029 //  AUTHOR......: Anderson Maciel
00030 //  DATE........: January/16/2000
00031 //  DESCRIPTION.: Methods implementation.
00032 //
00034 
00035 #include        <stdio.h>
00036 #include        <kinematics/comebiaxialjoint.h>
00037 #include        <kinematics/comedof.h>
00038 
00039 COME_BiaxialJoint::COME_BiaxialJoint( void ):COME_Joint(){
00040 
00041         setParent( NULL );
00042         COME_Dof *d1 = new COME_Dof( COME_Vector3D( 0, 0, 1 ), COME_Point3D(), new COME_Bezier() );
00043         COME_Dof *d2 = new COME_Dof( COME_Vector3D( 1, 0, 0 ), COME_Point3D(), new COME_Bezier() );
00044         d1->setOwnerJoint( this );
00045         d2->setOwnerJoint( this );
00046         vpAddDof( d1 );
00047         vpAddDof( d2 );
00048         vpMakeLim();
00049 }
00050 
00051 COME_BiaxialJoint::COME_BiaxialJoint( COME_Joint *parent ):COME_Joint(){
00052 
00053         setParent( parent );
00054         COME_Dof *d1 = new COME_Dof( COME_Vector3D( 0, 0, 1 ), COME_Point3D(), new COME_Bezier() );
00055         COME_Dof *d2 = new COME_Dof( COME_Vector3D( 1, 0, 0 ), COME_Point3D(), new COME_Bezier() );
00056         d1->setOwnerJoint( this );
00057         d2->setOwnerJoint( this );
00058         vpAddDof( d1 );
00059         vpAddDof( d2 );
00060         vpMakeLim();
00061 }
00062 
00063 COME_BiaxialJoint::COME_BiaxialJoint( COME_Joint *parent, COME_Dof *dof1, COME_Dof *dof2 ):COME_Joint(){
00064 
00065         setParent( parent );
00066         dof1->setOwnerJoint( this );
00067         dof2->setOwnerJoint( this );
00068         vpAddDof( dof1 );
00069         vpAddDof( dof2 );
00070         vpMakeLim();
00071 }
00072 
00073 void
00074 COME_BiaxialJoint::setFlexionTo( double value ){
00075 
00076         getDofList()[0]->vpMoveTo( value );
00077         vpMakeLim();
00078 }
00079 
00080 void
00081 COME_BiaxialJoint::setAductionTo( double value ){
00082 
00083         getDofList()[1]->vpMoveTo( value );
00084         vpMakeLim();
00085 }

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