##

BulletCollision.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/* Desc: Collision class
* Author: Nate Koenig
* Date: 13 Feb 2006
*/
#ifndef GAZEBO_PHYSICS_BULLET_BULLETCOLLISION_HH_
#define GAZEBO_PHYSICS_BULLET_BULLETCOLLISION_HH_
#include <string>
#include "gazebo/physics/bullet/BulletTypes.hh"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/physics/Collision.hh"
#include "gazebo/util/system.hh"
class btCollisionShape;
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE BulletCollision : public Collision
{
public: explicit BulletCollision(LinkPtr _parent);
public: virtual ~BulletCollision();
public: virtual void Load(sdf::ElementPtr _ptr);
public: virtual void OnPoseChange();
public: virtual void SetCategoryBits(unsigned int _bits);
public: virtual void SetCollideBits(unsigned int _bits);
public: virtual unsigned int GetCategoryBits() const;
public: virtual unsigned int GetCollideBits() const;
// Documentation inherited
public: virtual ignition::math::Box BoundingBox() const;
public: void SetCollisionShape(btCollisionShape *_shape,
bool _placeable = true);
public: btCollisionShape *GetCollisionShape() const;
public: void SetCompoundShapeIndex(int _index);
public: BulletSurfaceParamsPtr GetBulletSurface() const;
protected: btCollisionShape *collisionShape;
private: unsigned int categoryBits;
private: unsigned int collideBits;
};
}
}
#endif
gazebo::physics::BulletCollision::collisionShape
btCollisionShape * collisionShape
Definition: BulletCollision.hh:93
gazebo::physics::BulletCollision::Load
virtual void Load(sdf::ElementPtr _ptr)
Load the collision.
gazebo::physics::Collision
Base class for all collision entities.
Definition: Collision.hh:38
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
Collision.hh
BulletTypes.hh
Bullet wrapper forward declarations and typedefs.
system.hh
gazebo::physics::BulletCollision
Bullet collisions.
Definition: BulletCollision.hh:43
PhysicsTypes.hh
default namespace for gazebo
gazebo::physics::BulletCollision::SetCompoundShapeIndex
void SetCompoundShapeIndex(int _index)
Set the index of the compound shape.
gazebo::physics::BulletCollision::~BulletCollision
virtual ~BulletCollision()
Destructor.
gazebo::physics::BulletCollision::BulletCollision
BulletCollision(LinkPtr _parent)
Constructor.
gazebo::physics::BulletCollision::BoundingBox
virtual ignition::math::Box BoundingBox() const
Get the bounding box for this collision.
gazebo::physics::BulletCollision::GetCategoryBits
virtual unsigned int GetCategoryBits() const
Get the category bits, used during collision detection.
gazebo::physics::BulletSurfaceParamsPtr
boost::shared_ptr< BulletSurfaceParams > BulletSurfaceParamsPtr
Definition: BulletTypes.hh:46
gazebo::physics::BulletCollision::OnPoseChange
virtual void OnPoseChange()
On pose change.
gazebo::physics::BulletCollision::GetCollideBits
virtual unsigned int GetCollideBits() const
Get the collide bits, used during collision detection.
gazebo::physics::BulletCollision::SetCategoryBits
virtual void SetCategoryBits(unsigned int _bits)
Set the category bits, used during collision detection.
gazebo::physics::BulletCollision::SetCollisionShape
void SetCollisionShape(btCollisionShape *_shape, bool _placeable=true)
Set the collision shape.
gazebo::physics::BulletCollision::GetCollisionShape
btCollisionShape * GetCollisionShape() const
Get the bullet collision shape.
gazebo::physics::LinkPtr
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
gazebo::physics::BulletCollision::SetCollideBits
virtual void SetCollideBits(unsigned int _bits)
Set the collide bits, used during collision detection.
gazebo::physics::BulletCollision::GetBulletSurface
BulletSurfaceParamsPtr GetBulletSurface() const
Similar to Collision::GetSurface, but provides dynamically casted pointer to BulletSurfaceParams.