page7 Culling 剔除

page7
Culling 剔除
hiding spatials and nodes
What is Culling?
1:Culling means that a geometry is not rendered by the graphics card
(Culling意味着几何体不是被图片渲染的)
2:The geometry is still processed as part of the scene graph but all rendering-related operations are suspended
(被操作的几何体仍然做为场景的一部分,但所有的渲染相关操作是被停止的)
3:A spatial can have a cull state of  "always", "never" or "inherit" (which is the default)
一个空间体的剔除状态可以有“永远”,“从不”或“继承”(默认值继承)

houseOne.setCullHint(CullHint.Always); 剔除houseOne状态为Always永远

houseOne.setCullHint(CullHint.Inherit);使用继承状态使houseOne再次显示

immobileNode.setCullhint(CullHint.Always);使用永远状态剔除“不移动”的跟节点

默认状态是继承,导致两个节点都不可见

houseTwo.setCullHint(CullHint.Never);houseTwo节点设置成剔除状态从不

this makes houseTwo visible again, it is not influenced by the cull state of its parent immobileNode anymore
这样使得houseTwo再次可见,它不受它的父节点immobileNode的继承关系影响而改变剔除状态了

immobileNode.setCullHint(Cullhint.Inherit);
继承根节点的剔除状态

which makes both houses visible again


你可能感兴趣的:(page)