#include <PQPCollisionDetection.h>
Inheritance diagram for Physsim::PQPCollisionDetection:

Public Member Functions | |
| PQPCollisionDetection () | |
| Default constructor. | |
| PQPCollisionDetection (const std::vector< DynamicBodyPtr > &bodies) | |
| Constructs a PQPCollisionDetection object with a vector of dynamic bodies. | |
| PQPCollisionDetection (const std::vector< DynamicBodyPtr > &bodies, bool disable_adjacent) | |
| Constructs a PQPCollisionDetection object with a vector of dynamic bodies. | |
| void | reconstruct () |
| Reconstructs the PQP models used for collision detection. | |
| void | reconstruct (CollisionGeometryPtr geom) |
| Reconstructs the PQP model used for collision detection. | |
| virtual void | clone (BasePtr &cloned, bimap< BasePtr, BasePtr > *obj_map=NULL) const |
| Clones this object. | |
| virtual bool | is_struct_identical (BaseConstPtr object) const |
| Verifies that structure is identical. | |
| virtual void | load_state (BaseConstPtr object, bimap< BasePtr, BasePtr > *correspondence=NULL) |
| Loads the state of this object. | |
| virtual void | save_state (BasePtr object, bimap< BasePtr, BasePtr > *correspondence=NULL) const |
| Saves the state of this object. | |
| virtual bool | is_collision (Real epsilon=0.0) |
| Implementation of abstract method CollisionDetection::is_collision(). | |
| virtual Real | calc_distances () |
| Impelementation of abstract method CollisionDetection::calc_distances(). | |
| virtual std::list< ContactPtr > | find_contacts (CollisionGeometryPtr g1, CollisionGeometryPtr g2) |
| Determines the contact for a pair of CollisionGeometries. | |
| virtual void | load_from_xml (XMLTreeConstPtr node, std::map< std::string, BasePtr > &id_map) |
| Implements Base::load_from_xml(). | |
| virtual void | save_to_xml (XMLTreePtr node, std::list< BaseConstPtr > &shared_objects) const |
| Implements Base::save_to_xml(). | |
| virtual void | add_collision_geometry (CollisionGeometryPtr geom) |
| Adds a collision geometryto the PQP collision detector. | |
| virtual void | remove_collision_geometry (CollisionGeometryPtr geom) |
| Removes a specific collision geometry. | |
| virtual void | remove_all_collision_geometries () |
| Removes all geometries. | |
| void | set_distance_query_rerr (Real err) |
| Sets the relative error for a distance query (default is NEAR_ZERO). | |
| void | set_distance_query_aerr (Real err) |
| Sets the absolute error for a distance query (default is infinity). | |
| bool | get_geoms_interpenetrate () const |
| Gets whether geometries can interpenetrate. | |
| void | set_geoms_interpenetrate (bool flag) |
| Sets whether geometries can interpenetrate. | |
Protected Member Functions | |
|
boost::shared_ptr< std::list< std::pair< TriangleConstPtr, TriangleConstPtr > > > | get_colliding_tris (CollisionGeometryPtr g1, boost::shared_ptr< CollisionGeometry > g2) const |
| virtual void | clone_query_results (BasePtr &cloned, bimap< BasePtr, BasePtr > *object_map) const |
| Clones any query results. | |
| virtual void | save_query_results (BasePtr object, bimap< BasePtr, BasePtr > *correspondence) const |
| Saves any query results. | |
| virtual void | load_query_results (BaseConstPtr object, bimap< BasePtr, BasePtr > *correspondence) |
| Loads any query results. | |
Protected Attributes | |
|
std::map< Vector3ConstPtr, std::list< TriangleConstPtr > > | _adj_facets |
| The map of facets adjacent to vertices in the various triangle meshes. | |
| bool | _geoms_interpenetrate |
| Flag as to whether geometries can interpenetrate. | |
|
std::map< CollisionGeometryPtr, std::list< TriangleConstPtr > > | _non_coplanar_facets |
| The map of geometries to their non-coplanar facets. | |
| PQPCollisionDetection::PQPCollisionDetection | ( | ) |
Default constructor.
Geometries cannot interpenetrate by default.
| PQPCollisionDetection::PQPCollisionDetection | ( | const std::vector< DynamicBodyPtr > & | bodies | ) |
Constructs a PQPCollisionDetection object with a vector of dynamic bodies.
| bodies | a vector of dynamic bodies |
| PQPCollisionDetection::PQPCollisionDetection | ( | const std::vector< DynamicBodyPtr > & | bodies, | |
| bool | disable_adjacent | |||
| ) |
Constructs a PQPCollisionDetection object with a vector of dynamic bodies.
| bodies | a vector of dynamic bodies | |
| disable_adjacent | set to true to disable adjacent links in articulated bodies |
| void PQPCollisionDetection::reconstruct | ( | CollisionGeometryPtr | geom | ) |
Reconstructs the PQP model used for collision detection.
If all geometries are to be reconstructed, reconstruct() should be called because it is much faster.
| void PQPCollisionDetection::load_state | ( | BaseConstPtr | object, | |
| bimap< BasePtr, BasePtr > * | correspondence = NULL | |||
| ) | [virtual] |
Loads the state of this object.
The underlying penalty resting contact method must have identical structure.
Reimplemented from Physsim::CollisionDetection.
Reimplemented in Physsim::ADFCollisionDetection.
| void PQPCollisionDetection::save_state | ( | BasePtr | object, | |
| bimap< BasePtr, BasePtr > * | correspondence = NULL | |||
| ) | const [virtual] |
Saves the state of this object.
The underlying penalty resting contact method must have identical structure.
Reimplemented from Physsim::CollisionDetection.
Reimplemented in Physsim::ADFCollisionDetection.
| std::list< ContactPtr > PQPCollisionDetection::find_contacts | ( | CollisionGeometryPtr | g1, | |
| CollisionGeometryPtr | g2 | |||
| ) | [virtual] |
Determines the contact for a pair of CollisionGeometries.
Implements Physsim::CollisionDetection.
Reimplemented in Physsim::ADFCollisionDetection.
| void PQPCollisionDetection::save_to_xml | ( | XMLTreePtr | node, | |
| std::list< BaseConstPtr > & | shared_objects | |||
| ) | const [virtual] |
Implements Base::save_to_xml().
Reimplemented from Physsim::CollisionDetection.
Reimplemented in Physsim::ADFCollisionDetection.
| void PQPCollisionDetection::remove_collision_geometry | ( | CollisionGeometryPtr | geom | ) | [virtual] |
Removes a specific collision geometry.
This method removes a specific collision geometry from the detector; it does not remove the children of this geometry.
Reimplemented from Physsim::CollisionDetection.
Reimplemented in Physsim::ADFCollisionDetection.
| void Physsim::PQPCollisionDetection::set_distance_query_rerr | ( | Real | err | ) | [inline] |
Sets the relative error for a distance query (default is NEAR_ZERO).
| void Physsim::PQPCollisionDetection::set_distance_query_aerr | ( | Real | err | ) | [inline] |
Sets the absolute error for a distance query (default is infinity).
| bool Physsim::PQPCollisionDetection::get_geoms_interpenetrate | ( | ) | const [inline] |
Gets whether geometries can interpenetrate.
Interpenetrating geometries is only useful when a penalty contact method is used, where geometries can interpenetrate significantly. Typically, this flag should not be set: the collision detection will operate much more quickly.
| void Physsim::PQPCollisionDetection::set_geoms_interpenetrate | ( | bool | flag | ) | [inline] |
Sets whether geometries can interpenetrate.
Interpenetrating geometries is only useful when a penalty contact method is used, where geometries can interpenetrate significantly. Typically, this flag should not be set: the collision detection will operate much more quickly. The default is false.
1.5.1