Point in viewFrustum

I want to calculate if a 3d point is in the view frustum or not.
I have my Frustum width and height calculated.
My point has its values - px,py,pz
If I want to find the frustum width at that point’s z value
would I do this:
pz * fw and pz * fh

But must I first transform this point by the camera matrix, modelview matrix, and projection matrix?

If you use modelview and projection matrices (mvp) to extract world space frustum planes, and if your point already in world space, you are done, you don’t need to transform point. There are plenty good VFC tutorials out there :slight_smile:

For only testing if a point is in the view frustum it is easiest to just tranform the point with the modelviewprojection matrix and then test for -w <= x <= w, -w <= y <= w etc. to see if it is inside.

For other things you might want the extract the frustum planes from the matrix and work with those.

[ www.trenki.net | vector_math (3d math library) | software renderer ]