by Thorsten » Tue Jul 24, 2018 6:58 am
If you know vector geometry:
* assume you have the view axis vector and the vector from eye to the object
-> normalize both to get unit vectors
* dot them into each other - that's the cosine of the angle between them
-> compare against a threshold, and you can quickly check a round field of view - may already be good enough
* project both into the horizontal plane (set the vertical coordinate to zero, normalize), dot them again - that's the cosine of the horizontal angle
* project both into the same vertical plane. normalize and dot again - that's the cosine of the vertical angle
-> compare these angles against the field of view
If you do not know vector geometry, I'm afraid it's much harder to explain...