Defined in:Sets the function that handles occlusion testing for a node.
void SetOcclusionCallback(OcclusionCallback *callback);
||A pointer to the function that performs the occlusion test.|
SetOcclusionCallbackfunction installs the procedure that is called when occlusion testing is needed for a node. The
OcclusionCallbacktype is defined as follows.
When the occlusion callback function is called, it should perform the same visibility test as the function installed by the
typedef bool OcclusionCallback(const Node *, const VisibilityRegion *, const List<OcclusionRegion> *);
Node::SetVisibilityCallbackfunction. The occlusion callback function should then use whatever means is appropriate to determine whether the node is occluded within any of the regions in the list specified by the last parameter. This is normally accomplished by calling one or more of the following member functions of the
The occlusion callback function should return
trueif the node is visible and
By default, the
Node::SphereVisiblefunction is installed as a node's occlusion callback function. This function passes the node's bounding sphere to the
OcclusionRegion::SphereOccludedfunction for each region in the list to determine whether the node is visible.
Node::AlwaysVisiblefunction may be installed as the occlusion callback function to force a node to be unoccluded all the time.
If a custom occlusion callback function is installed using the
SetOcclusionCallback, then a custom visibility callback function should also be installed using the