Parasol Planning Library (PPL)
CollisionDetectionMethod Class Reference

#include <CollisionDetectionMethod.h>

Inheritance diagram for CollisionDetectionMethod:
Inheritance graph
[legend]
Collaboration diagram for CollisionDetectionMethod:
Collaboration graph
[legend]

Public Member Functions

Construction
 CollisionDetectionMethod (const std::string &_name="CD_USER1")
 
virtual ~CollisionDetectionMethod ()
 
Accessors
const std::string & GetName () const
 
virtual void Print (std::ostream &_os) const
 
CD Interface
virtual bool IsInCollision (const GMSPolyhedron &_polyhedron1, const mathtool::Transformation &_transformation1, const GMSPolyhedron &_polyhedron2, const mathtool::Transformation &_transformation2, CDInfo &_cdInfo)
 
virtual bool IsInsideObstacle (const mathtool::Vector3d &_point, const GMSPolyhedron &_polyhedron, const mathtool::Transformation &_transformation)
 

Protected Attributes

Internal State
std::string m_name
 Name of the CD method. More...
 

Detailed Description

Base abstraction for geometric collision detection methods.

Examples
CollisionDetection_UseCase.cpp.

Constructor & Destructor Documentation

◆ CollisionDetectionMethod()

CollisionDetectionMethod::CollisionDetectionMethod ( const std::string &  _name = "CD_USER1")
Parameters
_nameThe method name.

◆ ~CollisionDetectionMethod()

CollisionDetectionMethod::~CollisionDetectionMethod ( )
virtualdefault

Member Function Documentation

◆ GetName()

const std::string & CollisionDetectionMethod::GetName ( ) const
Returns
Name of CD Method

◆ IsInCollision()

bool CollisionDetectionMethod::IsInCollision ( const GMSPolyhedron _polyhedron1,
const mathtool::Transformation &  _transformation1,
const GMSPolyhedron _polyhedron2,
const mathtool::Transformation &  _transformation2,
CDInfo _cdInfo 
)
virtual

Check if two polyhedrons are in collision.

Parameters
_polyhedron1The first polyhedron.
_transformation1Transformation for the first polyhedron.
_polyhedron2The second polyhedron.
_transformation2Transformation for the second polyhedron.
_cdInfoOutput information from the collision computation.
Returns
True if the polyhedrons are considered to be in collision. Some method check only intersection (i.e. Rapid, PQP) while others also check if one polyhedron is inside the other (i.e. PQPSolid).

Reimplemented in InsideSpheres, BoundingSpheres, Rapid, PQPSolid, and PQP.

Examples
CollisionDetection_UseCase.cpp.

◆ IsInsideObstacle()

bool CollisionDetectionMethod::IsInsideObstacle ( const mathtool::Vector3d &  _point,
const GMSPolyhedron _polyhedron,
const mathtool::Transformation &  _transformation 
)
virtual

Check if a point is inside of a polyhedron.

Parameters
_pointThe point to check.
_polyhedronThe polyhedron to check against.
_transformationTransformation for the polyhedron.
Returns
Is the point inside _polyhedron?

Reimplemented in PQPSolid.

Examples
CollisionDetection_UseCase.cpp.

◆ Print()

void CollisionDetectionMethod::Print ( std::ostream &  _os) const
virtual

Print information to an output stream.

Parameters
_osThe output stream.

Field Documentation

◆ m_name

std::string CollisionDetectionMethod::m_name
protected

Name of the CD method.


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