Biomechanical Joint Model
 Author: Anderson Maciel

comeplanejoint.cpp

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_planejoint.cpp
00027 //  DESCRIPTION.: 
00028 //
00029 //  AUTHOR......: Anderson Maciel
00030 //  DATE........: May/16/2001
00031 //  DESCRIPTION.: Methods implementation.
00032 //
00034 
00035 #include        <stdio.h>
00036 #include        <kinematics/comeplanejoint.h>
00037 #include        <kinematics/comedof.h>
00038 
00039 COME_PlaneJoint::COME_PlaneJoint( 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         COME_Dof *d3 = new COME_Dof( COME_Vector3D( 0, 1, 0 ), COME_Point3D(), new COME_Bezier() );
00045         d1->setOwnerJoint( this );
00046         d2->setOwnerJoint( this );
00047         d3->setOwnerJoint( this );
00048         vpAddDof( d1 );
00049         vpAddDof( d2 );
00050         vpAddDof( d3 );
00051         vpMakeLim();
00052 }
00053 
00054 COME_PlaneJoint::COME_PlaneJoint( COME_Joint *parent ):COME_Joint(){
00055 
00056         setParent( parent );
00057         COME_Dof *d1 = new COME_Dof( COME_Vector3D( 0, 0, 1 ), COME_Point3D(), new COME_Bezier() );
00058         COME_Dof *d2 = new COME_Dof( COME_Vector3D( 1, 0, 0 ), COME_Point3D(), new COME_Bezier() );
00059         COME_Dof *d3 = new COME_Dof( COME_Vector3D( 0, 1, 0 ), COME_Point3D(), new COME_Bezier() );
00060         d1->setOwnerJoint( this );
00061         d2->setOwnerJoint( this );
00062         d3->setOwnerJoint( this );
00063         vpAddDof( d1 );
00064         vpAddDof( d2 );
00065         vpAddDof( d3 );
00066         vpMakeLim();
00067 }
00068 
00069 COME_PlaneJoint::COME_PlaneJoint( COME_Joint *parent, COME_Dof *dof1, COME_Dof *dof2, COME_Dof *dof3 ):COME_Joint(){
00070 
00071         setParent( parent );
00072         dof1->setOwnerJoint( this );
00073         dof2->setOwnerJoint( this );
00074         dof3->setOwnerJoint( this );
00075         vpAddDof( dof1 );
00076         vpAddDof( dof2 );
00077         vpAddDof( dof3 );
00078         vpMakeLim();
00079 }
00080 
00081 
00082 void
00083 COME_PlaneJoint::setXSlideTo( double value ){
00084 
00085         getDofList()[0]->vpMoveTo( value );
00086         vpMakeLim();
00087 }
00088 
00089 void
00090 COME_PlaneJoint::setYSlideTo( double value ){
00091 
00092         getDofList()[1]->vpMoveTo( value );
00093         vpMakeLim();
00094 }
00095 
00096 void
00097 COME_PlaneJoint::setZSlideTo( double value ){
00098 
00099         getDofList()[2]->vpMoveTo( value );
00100         vpMakeLim();
00101 }

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