0
\$\begingroup\$

I would like to refine the output of the separating axis test to not only tell me whether convex polyhedron A intersects convex polyhedron B, but also whether A is completely inside B. Is it safe to say that if A's corner points' projections (onto the separating axes) are always inside B's corner points' projections, A is inside B?

Also, is this the standard way to do combined intersection + containment tests?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Right now it looks like the answer to the question would be simply "yes" — which is well below our minimum character count threshold for an answer. ;) Can you point to a problem or bug you've observed in this approach that we can help you correct? If not, what evidence do you have that this might be incorrect? \$\endgroup\$
    – DMGregory
    Feb 28, 2020 at 17:01
  • \$\begingroup\$ Hmm, maybe I'll make it a self-answer then. \$\endgroup\$
    – nnnmmm
    Feb 28, 2020 at 17:13
  • \$\begingroup\$ I am definitely interested in comments on whether that is the usual way to do it, or if there is an even simpler approach as well. \$\endgroup\$
    – nnnmmm
    Feb 28, 2020 at 17:14
  • \$\begingroup\$ Then it might be good to rephrase your question as "how to check whether one convex polyhedron is completely contained in another?" and post your proposed method as an answer to be voted on. Then others can chime in with alternative solutions. \$\endgroup\$
    – DMGregory
    Feb 28, 2020 at 17:29

1 Answer 1

0
\$\begingroup\$

Yes:

  1. If all of A's corner points are inside B, A is completely inside B
  2. A point is inside a convex polyhedron iff it is on the correct side of each face
  3. If any point, projected onto a face normal of B, is inside the interval formed by B's corner points projected onto the same face normal, it is on the correct side with respect to that face
  4. The face normals are part of the separating axes

I don't know whether there is a more straightforward or efficient way to do it.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .