C4 Engine
C4 Engine API Documentation

Node::NodeVisible

Defined in:  C4Node.h
Determines whether a node is visible within a given region.
Prototype

bool NodeVisible(const VisibilityRegion *region) const;

bool NodeVisible(const VisibilityRegion *region, const List<OcclusionRegion> *occlusionList) const;

Parameters
region The region for which the node should be tested for visibility.
occlusionList A list of occlusion regions for which the node should be tested for occlusion. This cannot be nullptr.
Description
The NodeVisible function calls a node's currently installed visibility procedure to determine whether the node is visible within the region specified by the region parameter. This function is normally only called from within the World Manager. The return value is true if the node is visible, and false otherwise.

If the occlusionList parameter is specified, then the NodeVisible function also determines whether the node is occluded by any of the regions in the occlusion list. If the node is fully occluded by any single region in the occlusion list, then the return value is false.

By default, a node's visibility callback function tests the node's bounding sphere against the planes of the given regions. A different visibility callback function can be installed by calling the Node::SetVisibilityCallback function.
See Also

Node::SetVisibilityCallback

VisibilityRegion

OcclusionRegion