SoOcclusionCulling Class Reference
[GroupsLarge Model]

VSG extension Group node derived from SoRenderList that performs an OpenGL-based occlusion culling test on its list of render objects. More...

#include <Inventor/nodes/SoOcclusionCulling.h>

Inheritance diagram for SoOcclusionCulling:
SoRenderList SoSeparator SoGroup SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoOcclusionCulling ()
void setThreshold (unsigned int threshold)
unsigned int getThreshold (void)
void setApproximateOcclusion (SbBool enable)
SbBool isApproximateOcclusion (void)
void setNumFrame (unsigned int num)
unsigned int getNumFrame (void)
void setUseHPExtension (SbBool enable)
SbBool getUseHPExtension (void)

Static Public Member Functions

static SoType getClassTypeId ()
static void setReportCB (SoOcclusionReportCB *func, void *data)

Detailed Description

VSG extension Group node derived from SoRenderList that performs an OpenGL-based occlusion culling test on its list of render objects.

The SoOcclusionCulling node uses the functionality from SoRenderList to create a list of paths to the shapes beneath it. It then reorganizes the list of shapes from front to back to perform an OpenGL-based occlusion culling test. The result is that render objects completely hidden by another visible object are not rendered. For instance, if the camera is inside an object, only the object containing the camera will be drawn (because that's the only object that the camera can see).

NOTE: This class does not exist in Open Inventor 10.0 and later.

The SoOcclusionCulling node depends on the graphics board having support for the OpenGL GL_HP_occlusion_test extension. If this OpenGL extension is not supported, the SoOcclusionCulling node will have no effect on the display of the scene graph.

If the occlusionCulling node is below another culling node (for instance, an octree and an occlusion culling node) then it will use the renderObject list computed by the RenderList above it (the octree). In this particular case, the isHead field (from SoRenderList) must be initialized to FALSE. Otherwise the node will create its own renderObject list, which is unnecessary and time consuming at scene graph creation time.

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoRenderList, SoOctreeOrdering

Deprecated:

Deprecated since Open Inventor 9800
SoOcclusionCulling has been deprecated and will be removed in next major version. Please use SoSeparator instead.

Constructor & Destructor Documentation

SoOcclusionCulling::SoOcclusionCulling (  ) 

Constructor.


Note: Do not modify an instance of this node or any of its children unless this node has a ref count greater than zero. If the node is itself the child of a grouping node then the ref count is automatically greater than zero, otherwise you must explicitly increment the ref count by calling the ref() method.


Member Function Documentation

static SoType SoOcclusionCulling::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoRenderList.

unsigned int SoOcclusionCulling::getNumFrame ( void   ) 

Returns the number of frames between recalculation of the list of occluders when approximate occlusion is On.

unsigned int SoOcclusionCulling::getThreshold ( void   ) 

Returns the pixel threshold.

virtual SoType SoOcclusionCulling::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoRenderList.

SbBool SoOcclusionCulling::getUseHPExtension ( void   )  [inline]

Returns TRUE if the GL_HP_occlusion_test test is used instead of GL_NV_occlusion_query test.

See setUseHPExtension.

SbBool SoOcclusionCulling::isApproximateOcclusion ( void   ) 

Returns TRUE if approximate occlusion is On.

void SoOcclusionCulling::setApproximateOcclusion ( SbBool  enable  ) 

Enabling this option may speed up rendering.

During the first frame, a list of occluders (objects that occlude others) will be computed. Then during the next N frames, only previously occluded objects will be tested against the previous occluders.

void SoOcclusionCulling::setNumFrame ( unsigned int  num  ) 

When approximate occlusion is On, after num frames, the list of occluders will be recalculated.

static void SoOcclusionCulling::setReportCB ( SoOcclusionReportCB func,
void *  data 
) [static]

This callback can be used to get render statistics: the number of objects actually rendered versus the number of objects that would have been rendered without the occlusion culling node.

void SoOcclusionCulling::setThreshold ( unsigned int  threshold  ) 

Specifies the number of pixels below which the object will be culled.

The graphics board must support the GL_NV_occlusion_query OpenGL extension, otherwise this method has no effect.

void SoOcclusionCulling::setUseHPExtension ( SbBool  enable  ) 

By default, and if the hardware supports it, during the n-1 frames where occluders are not retested, occluded objects are tested with a more efficient test using the GL_NV_occlusion_query extension.

If you prefer that the GL_NV_occlusion_query extension not be used, pass TRUE to this function; the GL_HP_occlusion_test extension will be used instead.


The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/