CameraProject & ProjectedZ()

Blitz3D Forums/Blitz3D Programming/CameraProject & ProjectedZ()

Bailius Maximus(Posted 2004) [#1]
What's is the ProjectedZ() function for if CameraProject is used to project a 3D point on to a 2D point on the screen? I've searched through recently these forums and couldn't find any mention of it's usefulness. I have a feeling though that it is actually usefull and am interested in it.

Any help would be appreciated!

Thanks!,
Joe
818-300-4756


Bot Builder(Posted 2004) [#2]
I'm pretty sure it lets you know if the point is in the camera view. One for in view and zero for out if view.


DJWoodgate(Posted 2004) [#3]
If Projectedz() returns zero It tells you that the point you projected is either behind the camera near clipping plane or beyond the far clipping plane in which case Projectedx() and Projectedy() will be invalid.


Bailius Maximus(Posted 2004) [#4]
Thanks for the quick responses!

I've gotten a "2" before though and actually still am getting a "2", so I wonder what that's all about? Maybe if within the fog range? It's weird and there's no real documentation on it and it seems noone's asked before which is also weird...it's a conspiracy I tell you!!! :)


DJWoodgate(Posted 2004) [#5]
Hey well spotted. I usually only test for zero and it seems I was making a nasty assumption about how it now works. It actually returns the camera near value. So it will return zero if the point is behind the camera, or beyond camera far, otherwise it returns camera near.


Bailius Maximus(Posted 2004) [#6]
Thanks DJW!