Hi there,
is there a simple way to query whether an specific element is within the camera frustum? I need this information to determine whether to play a sound that corresponds to the element.
If I understand it correctly "hardware occlusion query" doesn't work here because it goes per-pixel, not per-element.
Thanks,
gtimworks
camera frustum query
Re: camera frustum query
Transform the bounding box by the MVP matrix. If the X and Y coordinates are between -1 and +1 then the box is in the cone. If Z is less than 1 it is in front of the far plane. I'm not sure about the near plane - it is either Z > 0 or Z > -1.
Re: camera frustum query
Or use smgr->isCulled(node).