Cube Plane intersection points

Hello forum,

I am going through the code that finds and store the plane-cube intersection points. The total number of intersection points ranges from 3 to 6.

I am finding it hard to follow the code , probably i am not feeling comfortable with the underlying geometrical theories behind it.

Any reference is welcome regarding the theories of cube plane intersection

Thanks

You might want to take a look at this, particularly the plane/AABB intersection (you can turn your arbitrary cube into an AABB by transforming the plane into the cube local coordiante system)