I'm trying to implement frustum culling for my directx application. Each geometry in my application is surrounded by a bounding volume, which I'm trying to use to determine whether it's inside the view frustum or not. The bounding volume is a cube that guarantees to completely cover the geometry. To implement cube culling I used the rastertek frustum culling tutorial, but I think there is a bug.
It's implemented as:
CheckCube checks if any of the eight corner points of the cube are inside the viewing frustum. It checks if any one of the corner points are inside all 6 planes of the viewing frustum. If it does find a point inside all six planes of the viewing frustum it returns true, otherwise it returns false.
But it's also possible for the cube to be inside the frustum when neither of the corner points is. I've made a sketch - for simplicity assuming top-down view and orthographic projection. In red is the view frustum, in blue the bounding volume:
As you can see the bounding volume is inside the frustum, but neither of the corner points are. This causes bugs where objects appear and disappear and I haven't been able to solve this yet. I was wondering if someone can point me in the right direction on this.
