Parasol Planning Library (PPL)
PQPSolid Class Reference

#include <PQPCollisionDetection.h>

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

Public Member Functions

Construction
 PQPSolid ()
 
virtual ~PQPSolid ()
 
CollisionDetectorMethod Overrides
virtual bool IsInCollision (const GMSPolyhedron &_polyhedron1, const mathtool::Transformation &_t1, const GMSPolyhedron &_polyhedron2, const mathtool::Transformation &_t2, CDInfo &_cdInfo) override
 
virtual bool IsInsideObstacle (const mathtool::Vector3d &_point, const GMSPolyhedron &_polyhedron, const mathtool::Transformation &_transformation) override
 
- Public Member Functions inherited from PQP
 PQP ()
 
virtual ~PQP ()
 
- Public Member Functions inherited from CollisionDetectionMethod
 CollisionDetectionMethod (const std::string &_name="CD_USER1")
 
virtual ~CollisionDetectionMethod ()
 
const std::string & GetName () const
 
virtual void Print (std::ostream &_os) const
 

Additional Inherited Members

- Static Public Member Functions inherited from PQP
static PQP_Model * Build (const GMSPolyhedron &_polyhedron)
 
- Protected Attributes inherited from CollisionDetectionMethod
std::string m_name
 Name of the CD method. More...
 

Detailed Description

PQPSolid is an extended PQP which also checks if one mesh lies entirely within another.

Constructor & Destructor Documentation

◆ PQPSolid()

PQPSolid::PQPSolid ( )

◆ ~PQPSolid()

PQPSolid::~PQPSolid ( )
virtualdefault

Member Function Documentation

◆ IsInCollision()

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

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).

@TODO See if we can modify PQP_Distance to take const double arrays instead of just double arrays so we don't have to copy.

@TODO Update to use polyhedrons instead of bodies?

Reimplemented from PQP.

◆ IsInsideObstacle()

bool PQPSolid::IsInsideObstacle ( const mathtool::Vector3d &  _point,
const GMSPolyhedron _polyhedron,
const mathtool::Transformation &  _transformation 
)
overridevirtual

Shoot a pseudo-ray outward from a reference point to determine if it lies within a given body.

Parameters
_ptThe reference point of interest.
_bodyThe body to check against.
Returns
True if _pt is inside _body.

@TODO See if we can modify PQP_Collide to take const double arrays instead of just double arrays so we don't have to copy.

Todo:
This can still fail. I.e., what if we collide with two entering and one leaving triangle, as if we shot straight past the tip of a tetrahedron with the seem exactly aligned with the starting point? We need to check all colocated points, not just a pair. On detection of a scrape (colocated and different type) we need to erase all of the colocated collisions.

Reimplemented from CollisionDetectionMethod.


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