I have been looking for days now and everything that I have seen requires me to do some kind of conversion to try to figure out what the person means. I have completed two examples and both have failed.
I could use the sphere shape, but would settle for box if it works.
you need to start easy …
checking if a sphere is colliding with a plane OR on a certain side of a plane is relatively easy
getting the 6 planes equations for the view frustum of a camera is also not too hard
merge these 2 steps, and you’ve got it …
once you have that, you can start to replace the sphere with an AABB / OBB
I think that I have tried this and it not only included a lot of other things that weren’t supposed to be there and when it is maximized my objects disappear before they exit the side. I counted the objects and displayed them on the title bar
the position of the bounding sphere enclosing your mesh needs to be in “eye-space”. if you have a “scale”-component in your “model-to-world”-matrix, you need to scale the radius of your bounding sphere too. it can be problematic if you scale the mesh differently in the x/y/z axis, using …
glm::scale(vec3(1, 2, 3))
for example … because the length of the radius depends then on the direction. do you have a simple example?
This is something that I came up with myself. What it essentially does solve 2 equations one for the field of view and another for the aspect ratio. Too bad it doesn’t work.