##

ODECollision.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 _ODECOLLISION_HH_
#define _ODECOLLISION_HH_
#include "gazebo/physics/ode/ode_inc.h"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/physics/Collision.hh"
#include "gazebo/physics/ode/ODETypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE ODECollision : public Collision
{
public: explicit ODECollision(LinkPtr _parent);
public: virtual ~ODECollision();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
// Documentation inherited.
public: virtual void Fini();
public: void SetCollision(dGeomID _collisionId, bool _placeable);
public: dGeomID GetCollisionId() const;
public: int GetCollisionClass() const;
// Documentation inherited.
public: virtual void OnPoseChange();
// Documentation inherited.
public: virtual void SetCategoryBits(unsigned int bits);
// Documentation inherited.
public: virtual void SetCollideBits(unsigned int bits);
// Documentation inherited.
public: virtual ignition::math::Box BoundingBox() const;
public: dSpaceID GetSpaceId() const;
public: void SetSpaceId(dSpaceID _spaceid);
public: ODESurfaceParamsPtr GetODESurface() const;
private: void OnPoseChangeGlobal();
private: void OnPoseChangeRelative();
private: void OnPoseChangeNull();
protected: dSpaceID spaceId;
protected: dGeomID collisionId;
private: void (ODECollision::*onPoseChangeFunc)();
};
}
}
#endif
gazebo::physics::ODECollision::spaceId
dSpaceID spaceId
Collision space for this.
Definition: ODECollision.hh:103
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
gazebo::physics::ODECollision::~ODECollision
virtual ~ODECollision()
Destructor.
gazebo::physics::ODECollision::collisionId
dGeomID collisionId
ID for the collision.
Definition: ODECollision.hh:106
gazebo::physics::ODESurfaceParamsPtr
boost::shared_ptr< ODESurfaceParams > ODESurfaceParamsPtr
Definition: ODETypes.hh:55
gazebo::physics::ODECollision::SetCollision
void SetCollision(dGeomID _collisionId, bool _placeable)
Set the encapsulated collision object.
gazebo::physics::ODECollision
Base class for all ODE collisions.
Definition: ODECollision.hh:40
system.hh
PhysicsTypes.hh
default namespace for gazebo
gazebo::physics::ODECollision::SetCollideBits
virtual void SetCollideBits(unsigned int bits)
Set the collide bits, used during collision detection.
gazebo::physics::ODECollision::SetCategoryBits
virtual void SetCategoryBits(unsigned int bits)
Set the category bits, used during collision detection.
gazebo::physics::ODECollision::BoundingBox
virtual ignition::math::Box BoundingBox() const
Get the bounding box for this collision.
gazebo::physics::ODECollision::GetCollisionClass
int GetCollisionClass() const
Get the ODE collision class.
gazebo::physics::ODECollision::GetCollisionId
dGeomID GetCollisionId() const
Return the collision id.
gazebo::physics::ODECollision::OnPoseChange
virtual void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
ODETypes.hh
ODE wrapper forward declarations and typedefs.
gazebo::physics::LinkPtr
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
gazebo::physics::ODECollision::Load
virtual void Load(sdf::ElementPtr _sdf)
Load the collision.
gazebo::physics::ODECollision::ODECollision
ODECollision(LinkPtr _parent)
Constructor.
gazebo::physics::ODECollision::Fini
virtual void Fini()
Finalize the collision.
gazebo::physics::ODECollision::GetODESurface
ODESurfaceParamsPtr GetODESurface() const
Similar to Collision::GetSurface, but provides dynamically casted pointer to ODESurfaceParams.
gazebo::physics::ODECollision::SetSpaceId
void SetSpaceId(dSpaceID _spaceid)
Set the collision's space ID.
ode_inc.h
gazebo::physics::ODECollision::GetSpaceId
dSpaceID GetSpaceId() const
Get the collision's space ID.