Game Development Community

Frustrum Culling

by Cai Yundong · in Torque Game Engine Advanced · 03/06/2009 (12:56 pm) · 1 replies

Hi, i was reading an old article on torque tips and saw that torque had the ability to enable frustum culling. Does any one have any idea how i can enable or implement it ? Thanks in advance for any help !

The Article i saw was :
http://www.garagegames.com/community/blogs/view/10978

#1
04/24/2009 (12:26 pm)
I am hoping you found this out by now, but in the replies he explains where to find it a little more:
Quote:
Re: Frustum Culling Code ... I'm not going to post actual code, since this is a public blog. However, if you read frustrumCuller.h then the following, you should get it:

At the beginning of your renderObject method call init and pass it your SceneState

When you want to test if something is visible, pass testBoxVisibility a box (in object space), what clip planes you want to test against, and a zero. It returns -1 if the box is completely outside the view frustum, or a bitmask for what planes it hit.

If you still don't get it, go and read the source, it's pretty simple ;)