BulletCollision.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-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 /* Desc: Collision class
18  * Author: Nate Koenig
19  * Date: 13 Feb 2006
20  */
21 
22 #ifndef _BULLET_COLLISION_HH_
23 #define _BULLET_COLLISION_HH_
24 
25 #include <string>
26 
27 /*
28 
29 #include "gazebo/common/Param.hh"
30 #include "Entity.hh"
31 #include "gazebo/math/Pose.hh"
32 #include "gazebo/math/Vector3.hh"
33 #include "gazebo/physics/Collision.hh"
34 #include "gazebo/util/system.hh"
35 */
36 
40 #include "gazebo/util/system.hh"
41 
42 class btCollisionShape;
43 
44 namespace gazebo
45 {
46  namespace physics
47  {
51 
53  class GZ_PHYSICS_VISIBLE BulletCollision : public Collision
54  {
56  public: BulletCollision(LinkPtr _parent);
57 
59  public: virtual ~BulletCollision();
60 
62  public: virtual void Load(sdf::ElementPtr _ptr);
63 
65  public: virtual void OnPoseChange();
66 
69  public: virtual void SetCategoryBits(unsigned int _bits);
70 
73  public: virtual void SetCollideBits(unsigned int _bits);
74 
77  public: virtual unsigned int GetCategoryBits() const;
78 
81  public: virtual unsigned int GetCollideBits() const;
82 
84  public: virtual math::Box GetBoundingBox() const;
85 
89  public: void SetCollisionShape(btCollisionShape *_shape,
90  bool _placeable = true);
91 
93  public: btCollisionShape *GetCollisionShape() const;
94 
96  public: void SetCompoundShapeIndex(int _index);
97 
101  public: BulletSurfaceParamsPtr GetBulletSurface() const;
102 
103  protected: btCollisionShape *collisionShape;
104 
106  private: unsigned int categoryBits;
107 
109  private: unsigned int collideBits;
110  };
112  }
113 }
114 #endif
Bullet collisions.
Definition: BulletCollision.hh:53
boost::shared_ptr< BulletSurfaceParams > BulletSurfaceParamsPtr
Definition: BulletTypes.hh:47
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
Base class for all collision entities.
Definition: Collision.hh:44
Mathematical representation of a box and related functions.
Definition: Box.hh:35
default namespace for gazebo
Bullet wrapper forward declarations and typedefs.
btCollisionShape * collisionShape
Definition: BulletCollision.hh:103