7 #ifndef _COLLISION_DETECTION_H
8 #define _COLLISION_DETECTION_H
12 #include <Ravelin/VectorNd.h>
13 #include <Ravelin/Pose3d.h>
14 #include <Ravelin/sorted_pair>
15 #include <Moby/Base.h>
16 #include <Moby/PairwiseDistInfo.h>
17 #include <Moby/CollisionGeometry.h>
18 #include <Moby/UnilateralConstraint.h>
19 #include <Moby/RigidBody.h>
23 class ConstraintSimulator;
24 class ArticulatedBody;
25 class CollisionGeometry;
27 class IndexedTriArray;
43 virtual void set_simulator(boost::shared_ptr<ConstraintSimulator> sim) {}
44 virtual void broad_phase(
double dt,
const std::vector<ControlledBodyPtr>& bodies, std::vector<std::pair<CollisionGeometryPtr, CollisionGeometryPtr> >& to_check);
Defines an abstract collision detection mechanism.
Definition: CollisionDetection.h:38
Class from which all Moby classes are derived.
Definition: Base.h:20
static UnilateralConstraint create_contact(CollisionGeometryPtr a, CollisionGeometryPtr b, const Point3d &point, const Ravelin::Vector3d &normal, double violation=0.0)
Creates a contact constraint given the bare-minimum info.
Definition: CollisionDetection.cpp:57
boost::shared_ptr< CollisionDetection > get_this()
Get the shared pointer for this.
Definition: CollisionDetection.h:55
virtual void broad_phase(double dt, const std::vector< ControlledBodyPtr > &bodies, std::vector< std::pair< CollisionGeometryPtr, CollisionGeometryPtr > > &to_check)
Default broad phase function (checks everything)
Definition: CollisionDetection.cpp:28
virtual double calc_signed_dist(CollisionGeometryPtr cg1, CollisionGeometryPtr cg2, Point3d &p1, Point3d &p2)
Calculates the signed distance between two geometries.
Definition: CollisionDetection.h:49
boost::shared_ptr< CollisionGeometry > CollisionGeometryPtr
Collision geometry smart pointer.
Definition: Types.h:77
Ravelin::Vector3d Point3d
Typedef to distinguish between a 3D vector and a point.
Definition: Types.h:47
Projected constraint stabilization mechanism.
Definition: ConstraintStabilization.h:21
Container class for describing a unilateral constraint in the simulation.
Definition: UnilateralConstraint.h:27
static double calc_signed_dist(CollisionGeometryPtr a, CollisionGeometryPtr b, Point3d &cpa, Point3d &cpb)
Calculates the signed distances between two geometries and returns closest points if geometries are n...
Definition: CollisionGeometry.cpp:237
Structure for storing the pairwise distance between pointers to two CollisionGeometry objects...
Definition: PairwiseDistInfo.h:15