Vizard 8 » Command Index » Vizard objects » node3d » <node3d:renderNode>.setCullMask
8.1

<node3d:renderNode>.setCullMask

Set the cull mask

<node3d:renderNode>.setCullMask(  
mask  
mode = viz.MASK_SET  
)  
mask
The node mask
mode = viz.MASK_SET
Mode for specifying how to apply the mask. Can be one of the following:

Mask modes

viz.MASK_SET

Set the mask to the new value.

viz.MASK_ADD

Add the value to the existing mask.

viz.MASK_REMOVE

Remove the value from the existing mask.

viz.MASK_TOGGLE

Toggle the value with the existing mask.

Remarks

The cull mask is used to control which nodes will be rendered by the node. When creating a custom cull mask, use the <viz>.addNodeMask command to ensure that your cull mask does not conflict with any masks used internally by Vizard.

Return Value

None

Example

#Create a cull mask that won't conflict with any internal masks used by Vizard
CULL_MASK = viz.addNodeMask()

rn = viz.addRenderNode()
.
.
#Set the cull mask for the render node
rn.setCullMask(CULL_MASK)

ball = viz.add('ball.wrl')

#Remove cull mask from the balls node mask
#The ball will not be rendered by the render node
ball.setMask(CULL_MASK,mode=viz.MASK_REMOVE)

See also

<node3d:renderNode>.getCullMask
<viz>.addNodeMask
<node3d>.setMask