Given a plane and a cube, I am interested in determining if they intersect. If they do intersect, I would also like to find out:
What shape does their intersection form - a triangle, a parallelogram or a hexagon?
- In degenerate cases, it may just be a point or a segment.
What are the coordinates of the vertices where the intersection occurs?
2.1. Relative to the standard frame of reference
2.2. Relative to the cube's frame of reference
Note:
- The cube is created using
new THREE.BoxGeometry(1, 1, 1)
with translation and rotation applied throughapplyMatrix4
using corresponding matrices. - The plane under consideration is an arbitrary
new THREE.Plane()