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
32class btCollisionShape;
33
34namespace 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
92
93 protected: btCollisionShape *collisionShape;
94
96 private: unsigned int categoryBits;
97
99 private: unsigned int collideBits;
100 };
102 }
103}
104#endif
Bullet wrapper forward declarations and typedefs.
default namespace for gazebo
Bullet collisions.
Definition BulletCollision.hh:44
virtual void Load(sdf::ElementPtr _ptr)
Load the collision.
BulletCollision(LinkPtr _parent)
Constructor.
virtual ignition::math::Box BoundingBox() const
Get the bounding box for this collision.
BulletSurfaceParamsPtr GetBulletSurface() const
Similar to Collision::GetSurface, but provides dynamically casted pointer to BulletSurfaceParams.
void SetCompoundShapeIndex(int _index)
Set the index of the compound shape.
void SetCollisionShape(btCollisionShape *_shape, bool _placeable=true)
Set the collision shape.
virtual void SetCollideBits(unsigned int _bits)
Set the collide bits, used during collision detection.
virtual ~BulletCollision()
Destructor.
virtual unsigned int GetCollideBits() const
Get the collide bits, used during collision detection.
virtual void SetCategoryBits(unsigned int _bits)
Set the category bits, used during collision detection.
virtual unsigned int GetCategoryBits() const
Get the category bits, used during collision detection.
virtual void OnPoseChange()
On pose change.
btCollisionShape * collisionShape
Definition BulletCollision.hh:93
btCollisionShape * GetCollisionShape() const
Get the bullet collision shape.
Base class for all collision entities.
Definition Collision.hh:39
boost::shared_ptr< Link > LinkPtr
Definition PhysicsTypes.hh:109
boost::shared_ptr< BulletSurfaceParams > BulletSurfaceParamsPtr
Definition BulletTypes.hh:46
Forward declarations for the common classes.
Definition Animation.hh:27