Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

Joint.hh

Go to the documentation of this file.
00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /* Desc: The base joint class
00022  * Author: Nate Keonig, Andrew Howard
00023  * Date: 21 May 2003
00024  * CVS: $Id: Joint.hh,v 1.6 2004/06/01 00:04:07 inspectorg Exp $
00025  */
00026 
00027 #ifndef JOINT_HH
00028 #define JOINT_HH
00029 
00030 #include <ode/ode.h>
00031 
00032 class Body;
00033 
00034 class Joint
00035 {
00036   // Constructor
00037   protected: Joint();
00038 
00039   // Destructor
00040   protected: virtual ~Joint();
00041 
00042   // Get the type of the joint
00043   public: int GetType() const;
00044 
00045   // Get the body to which the joint is attached according the _index
00046   public: Body *GetJointBody( int index ) const;
00047 
00048   // Determines of the two bodies are connected by a joint
00049   public: bool AreConnected( Body *one, Body *two ) const;
00050 
00051   // Get the _parameter
00052   public: virtual double GetParam(int parameter) const;
00053 
00054   // Make this joint a fixed joint
00055   // Use this only when absolutely necessary
00056   public: void SetFixed();
00057 
00058   // Attach the two bodies with this joint
00059   public: void Attach( Body *one, Body *two );
00060 
00061   // Detach this joint from all bodies
00062   public: void Detach();
00063 
00064   // Set the _parameter to _value
00065   public: virtual void SetParam( int parameter, double value );
00066 
00067   // This is our id
00068   protected: dJointID jointId;
00069 
00070   // The first body this joint connects to
00071   private: Body* body1;
00072 
00073   // The second body this joint connects to
00074   private: Body* body2;
00075 };
00076 
00077 #endif
00078 


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:08 2005 for Gazebo by doxygen 1.4.2