00001 00002 // 00003 // PROJECT.....: vpat - Creating Virtual Patients 00004 // RESPONSIBLE.: Carla Freitas e Luciana Nedel 00005 // 00006 // FILE........: vpuniaxialjoint.cpp 00007 // DESCRIPTION.: Contain the VPUniaxialJoint class definitions. 00008 // 00009 // AUTHOR......: Anderson Maciel 00010 // DATE........: August/10/2000 00011 // DESCRIPTION.: Methods implementation. 00012 // 00014 00015 #include <stdio.h> 00016 #include <vpuniaxialjoint.h> 00017 #include <vpdof.h> 00018 00019 VPUniaxialJoint::VPUniaxialJoint( void ):VPJoint(){ 00020 00021 vpSetParent( NULL ); 00022 VPDof *d = new VPDof(); 00023 d->vpSetOwnerJoint( this ); 00024 vpAddDof( d ); 00025 vpMakeLim(); 00026 } 00027 00028 VPUniaxialJoint::VPUniaxialJoint( VPJoint *parent ):VPJoint(){ 00029 00030 vpSetParent( parent ); 00031 VPDof *d = new VPDof(); 00032 d->vpSetOwnerJoint( this ); 00033 vpAddDof( d ); 00034 vpMakeLim(); 00035 } 00036 00037 VPUniaxialJoint::VPUniaxialJoint( VPJoint *parent, VPDof *dof1 ):VPJoint(){ 00038 00039 vpSetParent( parent ); 00040 dof1->vpSetOwnerJoint( this ); 00041 vpAddDof( dof1 ); 00042 vpMakeLim(); 00043 } 00044 00045 void 00046 VPUniaxialJoint::vpSetFlexionTo( float value ){ 00047 00048 vpGetDofList()[0]->vpMoveTo( value ); 00049 vpMakeLim(); 00050 }