FixedJoint.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 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 
18 #ifndef _GAZEBO_FIXEDJOINT_HH_
19 #define _GAZEBO_FIXEDJOINT_HH_
20 
21 #include "gazebo/util/system.hh"
22 
23 namespace gazebo
24 {
25  namespace physics
26  {
29 
32  template<class T>
33  class GZ_PHYSICS_VISIBLE FixedJoint : public T
34  {
37  public: FixedJoint(BasePtr _parent) : T(_parent)
38  { this->AddType(Base::FIXED_JOINT); }
40  public: virtual ~FixedJoint()
41  { }
42 
43  // Documentation inherited.
44  public: virtual unsigned int GetAngleCount() const
45  {return 0;}
46 
49  public: virtual void Load(sdf::ElementPtr _sdf)
50  {
51  T::Load(_sdf);
52  }
53 
55  protected: virtual void Init()
56  {
57  T::Init();
58  }
59  };
61  }
62 }
63 #endif
64 
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:72
virtual void Init()
Initialize joint.
Definition: FixedJoint.hh:55
virtual ~FixedJoint()
Destructor.
Definition: FixedJoint.hh:40
#define GZ_PHYSICS_VISIBLE
Definition: system.hh:259
FixedJoint type.
Definition: Base.hh:119
A fixed joint rigidly connecting two bodies.
Definition: FixedJoint.hh:33
FixedJoint(BasePtr _parent)
Constructor.
Definition: FixedJoint.hh:37
virtual unsigned int GetAngleCount() const
Definition: FixedJoint.hh:44
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
virtual void Load(sdf::ElementPtr _sdf)
Load joint.
Definition: FixedJoint.hh:49