Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipsoids in collision & distance matrices #295

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions src/collision_func_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[GEOM_BOX][GEOM_PLANE] = &ShapeShapeCollide<Box, Plane>;
collision_matrix[GEOM_BOX][GEOM_HALFSPACE] =
&ShapeShapeCollide<Box, Halfspace>;
collision_matrix[GEOM_BOX][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Box, Ellipsoid>;

collision_matrix[GEOM_SPHERE][GEOM_BOX] = &ShapeShapeCollide<Sphere, Box>;
collision_matrix[GEOM_SPHERE][GEOM_SPHERE] =
Expand All @@ -332,6 +334,25 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[GEOM_SPHERE][GEOM_PLANE] = &ShapeShapeCollide<Sphere, Plane>;
collision_matrix[GEOM_SPHERE][GEOM_HALFSPACE] =
&ShapeShapeCollide<Sphere, Halfspace>;
collision_matrix[GEOM_SPHERE][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Sphere, Ellipsoid>;

collision_matrix[GEOM_ELLIPSOID][GEOM_BOX] =
&ShapeShapeCollide<Ellipsoid, Box>;
collision_matrix[GEOM_ELLIPSOID][GEOM_SPHERE] =
&ShapeShapeCollide<Ellipsoid, Sphere>;
collision_matrix[GEOM_ELLIPSOID][GEOM_CAPSULE] =
&ShapeShapeCollide<Ellipsoid, Capsule>;
collision_matrix[GEOM_ELLIPSOID][GEOM_CONE] =
&ShapeShapeCollide<Ellipsoid, Cone>;
collision_matrix[GEOM_ELLIPSOID][GEOM_CYLINDER] =
&ShapeShapeCollide<Ellipsoid, Cylinder>;
collision_matrix[GEOM_ELLIPSOID][GEOM_CONVEX] =
&ShapeShapeCollide<Ellipsoid, ConvexBase>;
// TODO Louis: Ellipsoid - Plane
// TODO Louis: Ellipsoid - Halfspace
collision_matrix[GEOM_ELLIPSOID][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Ellipsoid, Ellipsoid>;

collision_matrix[GEOM_CAPSULE][GEOM_BOX] = &ShapeShapeCollide<Capsule, Box>;
collision_matrix[GEOM_CAPSULE][GEOM_SPHERE] =
Expand All @@ -347,6 +368,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&ShapeShapeCollide<Capsule, Plane>;
collision_matrix[GEOM_CAPSULE][GEOM_HALFSPACE] =
&ShapeShapeCollide<Capsule, Halfspace>;
collision_matrix[GEOM_CAPSULE][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Capsule, Ellipsoid>;

collision_matrix[GEOM_CONE][GEOM_BOX] = &ShapeShapeCollide<Cone, Box>;
collision_matrix[GEOM_CONE][GEOM_SPHERE] = &ShapeShapeCollide<Cone, Sphere>;
Expand All @@ -359,6 +382,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[GEOM_CONE][GEOM_PLANE] = &ShapeShapeCollide<Cone, Plane>;
collision_matrix[GEOM_CONE][GEOM_HALFSPACE] =
&ShapeShapeCollide<Cone, Halfspace>;
collision_matrix[GEOM_CONE][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Cone, Ellipsoid>;

collision_matrix[GEOM_CYLINDER][GEOM_BOX] = &ShapeShapeCollide<Cylinder, Box>;
collision_matrix[GEOM_CYLINDER][GEOM_SPHERE] =
Expand All @@ -375,6 +400,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&ShapeShapeCollide<Cylinder, Plane>;
collision_matrix[GEOM_CYLINDER][GEOM_HALFSPACE] =
&ShapeShapeCollide<Cylinder, Halfspace>;
collision_matrix[GEOM_CYLINDER][GEOM_ELLIPSOID] =
&ShapeShapeCollide<Cylinder, Ellipsoid>;

collision_matrix[GEOM_CONVEX][GEOM_BOX] = &ShapeShapeCollide<ConvexBase, Box>;
collision_matrix[GEOM_CONVEX][GEOM_SPHERE] =
Expand All @@ -391,6 +418,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&ShapeShapeCollide<ConvexBase, Plane>;
collision_matrix[GEOM_CONVEX][GEOM_HALFSPACE] =
&ShapeShapeCollide<ConvexBase, Halfspace>;
collision_matrix[GEOM_CONVEX][GEOM_ELLIPSOID] =
&ShapeShapeCollide<ConvexBase, Ellipsoid>;

collision_matrix[GEOM_PLANE][GEOM_BOX] = &ShapeShapeCollide<Plane, Box>;
collision_matrix[GEOM_PLANE][GEOM_SPHERE] = &ShapeShapeCollide<Plane, Sphere>;
Expand All @@ -404,6 +433,7 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[GEOM_PLANE][GEOM_PLANE] = &ShapeShapeCollide<Plane, Plane>;
collision_matrix[GEOM_PLANE][GEOM_HALFSPACE] =
&ShapeShapeCollide<Plane, Halfspace>;
// TODO Louis: Ellipsoid - Plane

collision_matrix[GEOM_HALFSPACE][GEOM_BOX] =
&ShapeShapeCollide<Halfspace, Box>;
Expand All @@ -421,6 +451,7 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&ShapeShapeCollide<Halfspace, Plane>;
collision_matrix[GEOM_HALFSPACE][GEOM_HALFSPACE] =
&ShapeShapeCollide<Halfspace, Halfspace>;
// TODO Louis: Ellipsoid - Halfspace

collision_matrix[BV_AABB][GEOM_BOX] = &BVHShapeCollider<AABB, Box>::collide;
collision_matrix[BV_AABB][GEOM_SPHERE] =
Expand All @@ -436,6 +467,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<AABB, Plane>::collide;
collision_matrix[BV_AABB][GEOM_HALFSPACE] =
&BVHShapeCollider<AABB, Halfspace>::collide;
collision_matrix[BV_AABB][GEOM_ELLIPSOID] =
&BVHShapeCollider<AABB, Ellipsoid>::collide;

collision_matrix[BV_OBB][GEOM_BOX] = &BVHShapeCollider<OBB, Box>::collide;
collision_matrix[BV_OBB][GEOM_SPHERE] =
Expand All @@ -450,6 +483,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[BV_OBB][GEOM_PLANE] = &BVHShapeCollider<OBB, Plane>::collide;
collision_matrix[BV_OBB][GEOM_HALFSPACE] =
&BVHShapeCollider<OBB, Halfspace>::collide;
collision_matrix[BV_OBB][GEOM_ELLIPSOID] =
&BVHShapeCollider<OBB, Ellipsoid>::collide;

collision_matrix[BV_RSS][GEOM_BOX] = &BVHShapeCollider<RSS, Box>::collide;
collision_matrix[BV_RSS][GEOM_SPHERE] =
Expand All @@ -464,6 +499,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[BV_RSS][GEOM_PLANE] = &BVHShapeCollider<RSS, Plane>::collide;
collision_matrix[BV_RSS][GEOM_HALFSPACE] =
&BVHShapeCollider<RSS, Halfspace>::collide;
collision_matrix[BV_RSS][GEOM_ELLIPSOID] =
&BVHShapeCollider<RSS, Ellipsoid>::collide;

collision_matrix[BV_KDOP16][GEOM_BOX] =
&BVHShapeCollider<KDOP<16>, Box>::collide;
Expand All @@ -481,6 +518,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<KDOP<16>, Plane>::collide;
collision_matrix[BV_KDOP16][GEOM_HALFSPACE] =
&BVHShapeCollider<KDOP<16>, Halfspace>::collide;
collision_matrix[BV_KDOP16][GEOM_ELLIPSOID] =
&BVHShapeCollider<KDOP<16>, Ellipsoid>::collide;

collision_matrix[BV_KDOP18][GEOM_BOX] =
&BVHShapeCollider<KDOP<18>, Box>::collide;
Expand All @@ -498,6 +537,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<KDOP<18>, Plane>::collide;
collision_matrix[BV_KDOP18][GEOM_HALFSPACE] =
&BVHShapeCollider<KDOP<18>, Halfspace>::collide;
collision_matrix[BV_KDOP18][GEOM_ELLIPSOID] =
&BVHShapeCollider<KDOP<18>, Ellipsoid>::collide;

collision_matrix[BV_KDOP24][GEOM_BOX] =
&BVHShapeCollider<KDOP<24>, Box>::collide;
Expand All @@ -515,6 +556,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<KDOP<24>, Plane>::collide;
collision_matrix[BV_KDOP24][GEOM_HALFSPACE] =
&BVHShapeCollider<KDOP<24>, Halfspace>::collide;
collision_matrix[BV_KDOP24][GEOM_ELLIPSOID] =
&BVHShapeCollider<KDOP<24>, Ellipsoid>::collide;

collision_matrix[BV_kIOS][GEOM_BOX] = &BVHShapeCollider<kIOS, Box>::collide;
collision_matrix[BV_kIOS][GEOM_SPHERE] =
Expand All @@ -530,6 +573,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<kIOS, Plane>::collide;
collision_matrix[BV_kIOS][GEOM_HALFSPACE] =
&BVHShapeCollider<kIOS, Halfspace>::collide;
collision_matrix[BV_kIOS][GEOM_ELLIPSOID] =
&BVHShapeCollider<kIOS, Ellipsoid>::collide;

collision_matrix[BV_OBBRSS][GEOM_BOX] =
&BVHShapeCollider<OBBRSS, Box>::collide;
Expand All @@ -547,6 +592,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&BVHShapeCollider<OBBRSS, Plane>::collide;
collision_matrix[BV_OBBRSS][GEOM_HALFSPACE] =
&BVHShapeCollider<OBBRSS, Halfspace>::collide;
collision_matrix[BV_OBBRSS][GEOM_ELLIPSOID] =
&BVHShapeCollider<OBBRSS, Ellipsoid>::collide;

collision_matrix[HF_AABB][GEOM_BOX] =
&HeightFieldShapeCollider<AABB, Box>::collide;
Expand All @@ -564,6 +611,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&HeightFieldShapeCollider<AABB, Plane>::collide;
collision_matrix[HF_AABB][GEOM_HALFSPACE] =
&HeightFieldShapeCollider<AABB, Halfspace>::collide;
collision_matrix[HF_AABB][GEOM_ELLIPSOID] =
&HeightFieldShapeCollider<AABB, Ellipsoid>::collide;

collision_matrix[HF_OBBRSS][GEOM_BOX] =
&HeightFieldShapeCollider<OBBRSS, Box>::collide;
Expand All @@ -581,6 +630,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
&HeightFieldShapeCollider<OBBRSS, Plane>::collide;
collision_matrix[HF_OBBRSS][GEOM_HALFSPACE] =
&HeightFieldShapeCollider<OBBRSS, Halfspace>::collide;
collision_matrix[HF_OBBRSS][GEOM_ELLIPSOID] =
&HeightFieldShapeCollider<OBBRSS, Ellipsoid>::collide;

collision_matrix[BV_AABB][BV_AABB] = &BVHCollide<AABB>;
collision_matrix[BV_OBB][BV_OBB] = &BVHCollide<OBB>;
Expand All @@ -600,6 +651,7 @@ CollisionFunctionMatrix::CollisionFunctionMatrix() {
collision_matrix[GEOM_OCTREE][GEOM_CONVEX] = &Collide<OcTree, ConvexBase>;
collision_matrix[GEOM_OCTREE][GEOM_PLANE] = &Collide<OcTree, Plane>;
collision_matrix[GEOM_OCTREE][GEOM_HALFSPACE] = &Collide<OcTree, Halfspace>;
collision_matrix[GEOM_OCTREE][GEOM_ELLIPSOID] = &Collide<OcTree, Ellipsoid>;

collision_matrix[GEOM_BOX][GEOM_OCTREE] = &Collide<Box, OcTree>;
collision_matrix[GEOM_SPHERE][GEOM_OCTREE] = &Collide<Sphere, OcTree>;
Expand Down
44 changes: 44 additions & 0 deletions src/distance_func_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
distance_matrix[GEOM_BOX][GEOM_PLANE] = &ShapeShapeDistance<Box, Plane>;
distance_matrix[GEOM_BOX][GEOM_HALFSPACE] =
&ShapeShapeDistance<Box, Halfspace>;
distance_matrix[GEOM_BOX][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Box, Ellipsoid>;

distance_matrix[GEOM_SPHERE][GEOM_BOX] = &ShapeShapeDistance<Sphere, Box>;
distance_matrix[GEOM_SPHERE][GEOM_SPHERE] =
Expand All @@ -305,6 +307,25 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
distance_matrix[GEOM_SPHERE][GEOM_PLANE] = &ShapeShapeDistance<Sphere, Plane>;
distance_matrix[GEOM_SPHERE][GEOM_HALFSPACE] =
&ShapeShapeDistance<Sphere, Halfspace>;
distance_matrix[GEOM_SPHERE][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Sphere, Ellipsoid>;

distance_matrix[GEOM_ELLIPSOID][GEOM_BOX] =
&ShapeShapeDistance<Ellipsoid, Box>;
distance_matrix[GEOM_ELLIPSOID][GEOM_SPHERE] =
&ShapeShapeDistance<Ellipsoid, Sphere>;
distance_matrix[GEOM_ELLIPSOID][GEOM_CAPSULE] =
&ShapeShapeDistance<Ellipsoid, Capsule>;
distance_matrix[GEOM_ELLIPSOID][GEOM_CONE] =
&ShapeShapeDistance<Ellipsoid, Cone>;
distance_matrix[GEOM_ELLIPSOID][GEOM_CYLINDER] =
&ShapeShapeDistance<Ellipsoid, Cylinder>;
distance_matrix[GEOM_ELLIPSOID][GEOM_CONVEX] =
&ShapeShapeDistance<Ellipsoid, ConvexBase>;
// TODO Louis: Ellipsoid - Plane
// TODO Louis: Ellipsoid - Halfspace
distance_matrix[GEOM_ELLIPSOID][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Ellipsoid, Ellipsoid>;

distance_matrix[GEOM_CAPSULE][GEOM_BOX] = &ShapeShapeDistance<Capsule, Box>;
distance_matrix[GEOM_CAPSULE][GEOM_SPHERE] =
Expand All @@ -320,6 +341,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&ShapeShapeDistance<Capsule, Plane>;
distance_matrix[GEOM_CAPSULE][GEOM_HALFSPACE] =
&ShapeShapeDistance<Capsule, Halfspace>;
distance_matrix[GEOM_CAPSULE][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Capsule, Ellipsoid>;

distance_matrix[GEOM_CONE][GEOM_BOX] = &ShapeShapeDistance<Cone, Box>;
distance_matrix[GEOM_CONE][GEOM_SPHERE] = &ShapeShapeDistance<Cone, Sphere>;
Expand All @@ -332,6 +355,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
distance_matrix[GEOM_CONE][GEOM_PLANE] = &ShapeShapeDistance<Cone, Plane>;
distance_matrix[GEOM_CONE][GEOM_HALFSPACE] =
&ShapeShapeDistance<Cone, Halfspace>;
distance_matrix[GEOM_CONE][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Cone, Ellipsoid>;

distance_matrix[GEOM_CYLINDER][GEOM_BOX] = &ShapeShapeDistance<Cylinder, Box>;
distance_matrix[GEOM_CYLINDER][GEOM_SPHERE] =
Expand All @@ -348,6 +373,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&ShapeShapeDistance<Cylinder, Plane>;
distance_matrix[GEOM_CYLINDER][GEOM_HALFSPACE] =
&ShapeShapeDistance<Cylinder, Halfspace>;
distance_matrix[GEOM_CYLINDER][GEOM_ELLIPSOID] =
&ShapeShapeDistance<Cylinder, Ellipsoid>;

distance_matrix[GEOM_CONVEX][GEOM_BOX] = &ShapeShapeDistance<ConvexBase, Box>;
distance_matrix[GEOM_CONVEX][GEOM_SPHERE] =
Expand All @@ -364,6 +391,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&ShapeShapeDistance<ConvexBase, Plane>;
distance_matrix[GEOM_CONVEX][GEOM_HALFSPACE] =
&ShapeShapeDistance<ConvexBase, Halfspace>;
distance_matrix[GEOM_CONVEX][GEOM_ELLIPSOID] =
&ShapeShapeDistance<ConvexBase, Ellipsoid>;

distance_matrix[GEOM_PLANE][GEOM_BOX] = &ShapeShapeDistance<Plane, Box>;
distance_matrix[GEOM_PLANE][GEOM_SPHERE] = &ShapeShapeDistance<Plane, Sphere>;
Expand All @@ -377,6 +406,7 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
distance_matrix[GEOM_PLANE][GEOM_PLANE] = &ShapeShapeDistance<Plane, Plane>;
distance_matrix[GEOM_PLANE][GEOM_HALFSPACE] =
&ShapeShapeDistance<Plane, Halfspace>;
// TODO Louis: Ellipsoid - Plane

distance_matrix[GEOM_HALFSPACE][GEOM_BOX] =
&ShapeShapeDistance<Halfspace, Box>;
Expand All @@ -394,6 +424,7 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&ShapeShapeDistance<Halfspace, Plane>;
distance_matrix[GEOM_HALFSPACE][GEOM_HALFSPACE] =
&ShapeShapeDistance<Halfspace, Halfspace>;
// TODO Louis: Ellipsoid - Halfspace

/* AABB distance not implemented */
/*
Expand Down Expand Up @@ -425,6 +456,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&BVHShapeDistancer<OBB, Plane>::distance;
distance_matrix[BV_OBB][GEOM_HALFSPACE] =
&BVHShapeDistancer<OBB, Halfspace>::distance;
distance_matrix[BV_OBB][GEOM_ELLIPSOID] =
&BVHShapeDistancer<OBB, Ellipsoid>::distance;

distance_matrix[BV_RSS][GEOM_BOX] = &BVHShapeDistancer<RSS, Box>::distance;
distance_matrix[BV_RSS][GEOM_SPHERE] =
Expand All @@ -440,6 +473,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&BVHShapeDistancer<RSS, Plane>::distance;
distance_matrix[BV_RSS][GEOM_HALFSPACE] =
&BVHShapeDistancer<RSS, Halfspace>::distance;
distance_matrix[BV_RSS][GEOM_ELLIPSOID] =
&BVHShapeDistancer<RSS, Ellipsoid>::distance;

/* KDOP distance not implemented */
/*
Expand Down Expand Up @@ -498,6 +533,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&BVHShapeDistancer<kIOS, Plane>::distance;
distance_matrix[BV_kIOS][GEOM_HALFSPACE] =
&BVHShapeDistancer<kIOS, Halfspace>::distance;
distance_matrix[BV_kIOS][GEOM_ELLIPSOID] =
&BVHShapeDistancer<kIOS, Ellipsoid>::distance;

distance_matrix[BV_OBBRSS][GEOM_BOX] =
&BVHShapeDistancer<OBBRSS, Box>::distance;
Expand All @@ -515,6 +552,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&BVHShapeDistancer<OBBRSS, Plane>::distance;
distance_matrix[BV_OBBRSS][GEOM_HALFSPACE] =
&BVHShapeDistancer<OBBRSS, Halfspace>::distance;
distance_matrix[BV_OBBRSS][GEOM_ELLIPSOID] =
&BVHShapeDistancer<OBBRSS, Ellipsoid>::distance;

distance_matrix[HF_AABB][GEOM_BOX] =
&HeightFieldShapeDistancer<AABB, Box>::distance;
Expand All @@ -532,6 +571,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&HeightFieldShapeDistancer<AABB, Plane>::distance;
distance_matrix[HF_AABB][GEOM_HALFSPACE] =
&HeightFieldShapeDistancer<AABB, Halfspace>::distance;
distance_matrix[HF_AABB][GEOM_ELLIPSOID] =
&HeightFieldShapeDistancer<AABB, Ellipsoid>::distance;

distance_matrix[HF_OBBRSS][GEOM_BOX] =
&HeightFieldShapeDistancer<OBBRSS, Box>::distance;
Expand All @@ -549,6 +590,8 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
&HeightFieldShapeDistancer<OBBRSS, Plane>::distance;
distance_matrix[HF_OBBRSS][GEOM_HALFSPACE] =
&HeightFieldShapeDistancer<OBBRSS, Halfspace>::distance;
distance_matrix[HF_OBBRSS][GEOM_ELLIPSOID] =
&HeightFieldShapeDistancer<OBBRSS, Ellipsoid>::distance;

distance_matrix[BV_AABB][BV_AABB] = &BVHDistance<AABB>;
distance_matrix[BV_OBB][BV_OBB] = &BVHDistance<OBB>;
Expand All @@ -565,6 +608,7 @@ DistanceFunctionMatrix::DistanceFunctionMatrix() {
distance_matrix[GEOM_OCTREE][GEOM_CONVEX] = &Distance<OcTree, ConvexBase>;
distance_matrix[GEOM_OCTREE][GEOM_PLANE] = &Distance<OcTree, Plane>;
distance_matrix[GEOM_OCTREE][GEOM_HALFSPACE] = &Distance<OcTree, Halfspace>;
distance_matrix[GEOM_OCTREE][GEOM_ELLIPSOID] = &Distance<OcTree, Ellipsoid>;

distance_matrix[GEOM_BOX][GEOM_OCTREE] = &Distance<Box, OcTree>;
distance_matrix[GEOM_SPHERE][GEOM_OCTREE] = &Distance<Sphere, OcTree>;
Expand Down