#include <clu.h>
Data Fields | |
CLUplane | left |
CLUplane | right |
CLUplane | bottom |
CLUplane | top |
CLUplane | near |
CLUplane | far |
CLUfrustum
struct defines the planes of a 3D frustum. This struct cannot be passed directly to OpenGL. Rather, it is used at the application level for application specific features or optimisations. For example, objects can be culled to the six planes of the view frustum to reduce the total amount of geometry sent to OpenGL.
CLcontext* context; CLmodel* model; CLUsphere* sphere;
...
context = clDefaultContext(clNewContext()); model = clioLoadModel(context, "Gomm.3ds");
sphere = cluSetSphereModel(model);
...
CLmatrix projection; CLmatrix modelview; CLUfrustum frustum;
glPushMatrix(); gluLookAt(0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&modelview); glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat*)&projection);
cluSetFrustumModelviewProjection(&frustum, &modelview, &projection);
if (cluFrustumInterceptSphere(&frustum, sphere)) cluRenderModel(model);
glPopMatrix();
Definition at line 263 of file clu.h.