ODEBallJoint.hh
00001 /*
00002  * Copyright 2011 Nate Koenig & Andrew Howard
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 /* Desc: An ODE ball joint
00018  * Author: Nate Keonig
00019  * Date: 13 Oct 2009
00020  * SVN: $Id: BallJoint.hh 7039 2008-09-24 18:06:29Z natepak $
00021  */
00022 
00023 #ifndef ODEBALLJOINT_HH
00024 #define ODEBALLJOINT_HH
00025 
00026 #include "physics/BallJoint.hh"
00027 #include "physics/ode/ODEJoint.hh"
00028 
00029 namespace gazebo
00030 {
00031     namespace physics
00032   {
00035     
00038 
00040     class ODEBallJoint : public BallJoint<ODEJoint>
00041     {
00043       public: ODEBallJoint( dWorldID worldId );
00044     
00046       public: virtual ~ODEBallJoint();
00047     
00049       public: virtual math::Vector3 GetAnchor(int index) const;
00050     
00052       public: virtual void SetAnchor( int index, const math::Vector3 &anchor );
00053   
00055       public: virtual math::Vector3 GetGlobalAxis(int /*index*/) const {return math::Vector3();}
00056   
00058       public: virtual void SetDamping(int index, const double damping);
00059   
00061       public: virtual void SetVelocity(int /*index*/, double /*angle*/) {}
00062   
00064       public: virtual double GetVelocity(int /*index*/) const {return 0;}
00065   
00067       public: virtual double GetMaxForce(int /*index*/) {return 0;}
00068   
00070       public: virtual void SetMaxForce(int /*index*/, double /*t*/) {}
00071   
00073       public: virtual math::Angle GetAngleImpl(int /*index*/) const {return math::Angle(0);}
00074    
00075     };
00076     
00079   }
00080 }
00081 #endif