HingeJoint.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17/* Desc: A body that has a box shape
18 * Author: Nate Koenig, Andrew Howard
19 * Date: 21 May 2003
20 */
21
22#ifndef GAZEBO_PHYSICS_HINGEJOINT_HH_
23#define GAZEBO_PHYSICS_HINGEJOINT_HH_
24
25#include "gazebo/util/system.hh"
26
27namespace gazebo
28{
29 namespace physics
30 {
33
36 template<class T>
37 class GZ_PHYSICS_VISIBLE HingeJoint : public T
38 {
41 public: explicit HingeJoint(BasePtr _parent) : T(_parent)
42 { this->AddType(Base::HINGE_JOINT); }
44 public: virtual ~HingeJoint()
45 { }
46
47 // Documentation inherited.
48 public: virtual unsigned int DOF() const
49 {return 1;}
50
53 public: virtual void Load(sdf::ElementPtr _sdf)
54 {
55 T::Load(_sdf);
56 }
57
59 protected: virtual void Init()
60 {
61 T::Init();
62 }
63 };
65 }
66}
67#endif
68
@ HINGE_JOINT
HingeJoint type.
Definition Base.hh:98
A single axis hinge joint.
Definition HingeJoint.hh:38
virtual ~HingeJoint()
Destructor.
Definition HingeJoint.hh:44
virtual void Init()
Initialize joint.
Definition HingeJoint.hh:59
HingeJoint(BasePtr _parent)
Constructor.
Definition HingeJoint.hh:41
virtual void Load(sdf::ElementPtr _sdf)
Load joint.
Definition HingeJoint.hh:53
virtual unsigned int DOF() const
Definition HingeJoint.hh:48
boost::shared_ptr< Base > BasePtr
Definition PhysicsTypes.hh:77
Forward declarations for the common classes.
Definition Animation.hh:27