Add Primitive Static Collision Detections
- Some of the less useful ones are not listed.
- This only details primitive (cylinder, capsule, sphere, oriented box, plane) collisions.
SurfaceMesh (most useful and difficult):
-
SurfaceMeshToSphereCD -
SurfaceMeshToCapsuleCD - Easiest of the surface mesh ones.
-
SurfaceMeshToCylinderCD (involves both curved surface and sharp edges) -
SurfaceMeshToOrientedBoxCD
LineMesh:
-
LineMeshToSphereCD (easy) (do this before capsule) -
LineMeshToCapsuleCD (easy) (useful) -
LineMeshToCylinderCD -
LineMeshToOrientedBoxCD
PointSet:
-
PointSetToCapsuleCD -
PointSetToOrientedBoxCD -
PointSetToPlaneCD -
PointSetToSphereCD -
PointSetToCylinderCD -
ImplicitGeometryToPointSetCD -
ImplicitGeometryToPointSetCCD
Primitive v Primitive (these tend to be less common in medical scenarios):
-
SphereToSphereCD -
SphereToCylinderCD -
BidirectionalPlaneToSphereCD -
UnidirectionalPlaneToSphereCD -
CapsuleToCapsuleCD -
CapsuleToSphereCD (easy, closest point on capsule edge to sphere center) -
CapsuleToPlaneCD (easy, closest point on capsule edge to plane) -
CylinderToPlaneCD -
CylinderToOrientedBoxCD -
CylinderToCylinderCD
... Other Permutations ... ... BidirectionalPlane Permutations ...
These can be added via unit tests (see existing CD unit tests). You don't need to implement them in some fancy simulation or verify against models, just check the CollisionData output. An accompanying example or interactive visual test for those complex ones might be useful. CollisionDataDebugObject may be used to draw contact, see BoxToBoxTest in Examples/CollisionDetection.
Do not add any spatial acceleration. That will be patterned out later for all CDs.
See CollisionUtils.h for a place to put all your collision/intersection functions. There are a number of existing basic ones provided: closest point on two lines. Closest point on triangle.