All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BulletJoint.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Nate Koenig
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: The base Bullet joint class
18  * Author: Nate Koenig, Andrew Howard
19  * Date: 21 May 2003
20  */
21 
22 #ifndef _BULLETJOINT_HH_
23 #define _BULLETJOINT_HH_
24 
26 #include "physics/Joint.hh"
27 
28 namespace gazebo
29 {
30  namespace physics
31  {
35 
37  class BulletJoint : public Joint
38  {
40  public: BulletJoint(BasePtr _parent);
41 
43  public: virtual ~BulletJoint();
44 
46  public: void Load(sdf::ElementPtr _sdf);
47 
49  public: virtual void Reset();
50 
53  public: LinkPtr GetJointLink(int _index) const;
54 
56  public: bool AreConnected(LinkPtr _one, LinkPtr _two) const;
57 
59  public: virtual void Detach();
60 
62  public: virtual void SetAnchor(int /*index*/,
63  const gazebo::math::Vector3 & /*anchor*/)
64  {gzerr << "Not implement in Bullet\n";}
65 
67  public: virtual void SetDamping(int /*index*/,
68  const double /*damping*/)
69  {gzerr << "Not implement in Bullet\n";}
70 
72  public: virtual math::Vector3 GetAnchor(int /*_index*/) const
73  {gzerr << "Not implement in Bullet\n";
74  return math::Vector3();}
75 
78  public: virtual math::Vector3 GetLinkForce(unsigned int /*_index*/) const
79  {gzerr << "Not implement in Bullet\n";
80  return math::Vector3();}
81 
84  public: virtual math::Vector3 GetLinkTorque(unsigned int /*_index*/) const
85  {gzerr << "Not implement in Bullet\n";
86  return math::Vector3();}
87 
89  public: virtual void SetAttribute(Attribute, int /*_index*/,
90  double /*_value*/)
91  {gzerr << "Not implement in Bullet\n";}
92 
93  protected: btTypedConstraint *constraint;
94  protected: btDynamicsWorld *world;
95  };
97  }
98 }
99 #endif