Robust way to determine if a 3D Model space point is within the view frustum

What is a robust way to determine if a point is within the view frustum of the current camera. The point may be obscured by other objects in front of it. I just want to know if it is within the visible volume.

I tried using projectPoint and used the projected 2D point to determine the above. However, this method does not clip or exclude points that are closer than the near limit.

Hello,

Not sure if this is exactly what you need for your particular workflow but there are two functions in the View class that can be used to test for visibility:

Thanks,
Tino

Hi Tino,

I am aware of these functions. But these will return false if the point is obscured by other entities. This I do not want. As long as the point is within the view frustum (even if hidden by objects in front of it), i want to base some action.

Thanks
kg

Hello Kg,

As you had previously mentioned, you can use the method projectPoint to test if the point is inside the canvas. To test if the point is being clipped by the camera near plane, I believe you just have to check if the z-value of the projected point is less than zero.

Thanks,
Tino