I am given a polyhedron which is represented by a list of planes. The volume delimited by these planes is the actual polyhedron.
I have a list of triangles, and I need to remove all the triangles that intersect or is contained in this polyhedron. My idea is to check each plane for an intersection with the triangle. If it does intersect the triangle, then check if the line segment representing the intersection contains a point that lies on the same side of all other planes.
To catch the case where the triangle is fully contained, we can just check if any of the triangle's corners is contained in the polyhedron (by checking that the point lies on the same side of all planes).
I'm not sure if this solution even works for all cases however, or if there is a more elegant solution. I'm also not sure how I can figure out if the line segment of an intersection contains a point on the same side of all the other planes.
I have thought about the separating axis theorem too, but that would require me to convert the polyhedron into some different representation (since the planes are infinite), and I'm not sure how to do that.
Any help would be appreciated!