#include <CollisionDetectionMethod.h>
Base abstraction for geometric collision detection methods.
- Examples
- CollisionDetection_UseCase.cpp.
◆ CollisionDetectionMethod()
CollisionDetectionMethod::CollisionDetectionMethod |
( |
const std::string & |
_name = "CD_USER1" | ) |
|
◆ ~CollisionDetectionMethod()
CollisionDetectionMethod::~CollisionDetectionMethod |
( |
| ) |
|
|
virtualdefault |
◆ GetName()
const std::string & CollisionDetectionMethod::GetName |
( |
| ) |
const |
◆ 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
-
_polyhedron1 | The first polyhedron. |
_transformation1 | Transformation for the first polyhedron. |
_polyhedron2 | The second polyhedron. |
_transformation2 | Transformation for the second polyhedron. |
_cdInfo | Output 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
-
_point | The point to check. |
_polyhedron | The polyhedron to check against. |
_transformation | Transformation 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
-
◆ m_name
std::string CollisionDetectionMethod::m_name |
|
protected |
The documentation for this class was generated from the following files: