Public Member Functions | Public Attributes | Protected Attributes
Collision Class Reference

Base class for all collision entities. More...

#include <Collision.hh>

Inheritance diagram for Collision:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Collision (LinkPtr link)
 Constructor.
virtual ~Collision ()
 Destructor.
void Fini ()
 Finalize the collision.
virtual void Load (sdf::ElementPtr &_sdf)
 Load the collision.
virtual void Init ()
virtual void UpdateParameters (sdf::ElementPtr &_sdf)
 Update the parameters using new sdf values.
void Save (std::string &prefix, std::ostream &stream)
 Save the collision.
void SetCollision (bool placeable)
 Set the encapsulated collsion object.
bool IsPlaceable () const
 Return whether this collision is placeable.
virtual void SetCategoryBits (unsigned int bits)=0
 Set the category bits, used during collision detection.
virtual void SetCollideBits (unsigned int bits)=0
 Set the collide bits, used during collision detection.
void SetLaserRetro (float retro)
 Set the laser retro reflectiveness.
float GetLaserRetro () const
 Get the laser retro reflectiveness.
void ShowBoundingBox (const bool &show)
 Set the visibility of the bounding box.
LinkPtr GetLink () const
 Get the link this collision belongs to.
ModelPtr GetModel () const
 Get the model this collision belongs to.
virtual math::Box GetBoundingBox () const =0
 Get the bounding box for this collision.
unsigned int GetShapeType ()
 Get the shape type.
void SetShape (ShapePtr shape)
 Set the shape for this collision.
ShapePtr GetShape () const
 Get the attached shape.
void SetContactsEnabled (bool _enable)
 Turn contact recording on or off.
bool GetContactsEnabled () const
 Return true of contact recording is on.
void AddContact (const Contact &contact)
 Add an occurance of a contact to this collision.
virtual math::Vector3 GetRelativeLinearVel () const
 Get the linear velocity of the collision.
virtual math::Vector3 GetWorldLinearVel () const
 Get the linear velocity of the collision in the world frame.
virtual math::Vector3 GetRelativeAngularVel () const
 Get the angular velocity of the collision.
virtual math::Vector3 GetWorldAngularVel () const
 Get the angular velocity of the collision in the world frame.
virtual math::Vector3 GetRelativeLinearAccel () const
 Get the linear acceleration of the collision.
virtual math::Vector3 GetWorldLinearAccel () const
 Get the linear acceleration of the collision in the world frame.
virtual math::Vector3 GetRelativeAngularAccel () const
 Get the angular acceleration of the collision.
virtual math::Vector3 GetWorldAngularAccel () const
 Get the angular acceleration of the collision in the world frame.
template<typename T >
event::ConnectionPtr ConnectContact (T subscriber)
void DisconnectContact (event::ConnectionPtr &c)
void FillCollisionMsg (msgs::Collision &_msg)
 Fill a collision message.
void ProcessMsg (const msgs::Collision &_msg)
 Update parameters from a message.

Public Attributes

event::EventT< void(const
std::string &, const Contact &)> 
contact
SurfaceParamsPtr surface

Protected Attributes

LinkPtr link
 The link this collision belongs to.
bool placeable
ShapePtr shape

Detailed Description

Base class for all collision entities.


Member Function Documentation

virtual void SetCategoryBits ( unsigned int  bits) [pure virtual]

Set the category bits, used during collision detection.

Parameters:
bitsThe bits

Implemented in ODECollision.

virtual void SetCollideBits ( unsigned int  bits) [pure virtual]

Set the collide bits, used during collision detection.

Parameters:
bitsThe bits

Implemented in ODECollision.


The documentation for this class was generated from the following file: