BulletCollision.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: Collision class
18  * Author: Nate Koenig
19  * Date: 13 Feb 2006
20  */
21 
22 #ifndef GAZEBO_PHYSICS_BULLET_BULLETCOLLISION_HH_
23 #define GAZEBO_PHYSICS_BULLET_BULLETCOLLISION_HH_
24 
25 #include <string>
26 
30 #include "gazebo/util/system.hh"
31 
32 class btCollisionShape;
33 
34 namespace gazebo
35 {
36  namespace physics
37  {
41 
43  class GZ_PHYSICS_VISIBLE BulletCollision : public Collision
44  {
46  public: explicit BulletCollision(LinkPtr _parent);
47 
49  public: virtual ~BulletCollision();
50 
52  public: virtual void Load(sdf::ElementPtr _ptr);
53 
55  public: virtual void OnPoseChange();
56 
59  public: virtual void SetCategoryBits(unsigned int _bits);
60 
63  public: virtual void SetCollideBits(unsigned int _bits);
64 
67  public: virtual unsigned int GetCategoryBits() const;
68 
71  public: virtual unsigned int GetCollideBits() const;
72 
73  // Documentation inherited
74  public: virtual ignition::math::Box BoundingBox() const;
75 
79  public: void SetCollisionShape(btCollisionShape *_shape,
80  bool _placeable = true);
81 
83  public: btCollisionShape *GetCollisionShape() const;
84 
86  public: void SetCompoundShapeIndex(int _index);
87 
91  public: BulletSurfaceParamsPtr GetBulletSurface() const;
92 
93  protected: btCollisionShape *collisionShape;
94 
96  private: unsigned int categoryBits;
97 
99  private: unsigned int collideBits;
100  };
102  }
103 }
104 #endif
Bullet collisions.
Definition: BulletCollision.hh:43
boost::shared_ptr< BulletSurfaceParams > BulletSurfaceParamsPtr
Definition: BulletTypes.hh:46
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
Base class for all collision entities.
Definition: Collision.hh:38
default namespace for gazebo
Bullet wrapper forward declarations and typedefs.
btCollisionShape * collisionShape
Definition: BulletCollision.hh:93