Cull Visitor

Part of OpenSceneGraph

Cullvisitor is a 'subroutine' - actually a functor. Any visitor traverses a sceneview tree, and performs an action on each Node that occurs. the cull visitor detects whether the bounding sphere of the node is on the screen (for a field of view of 60 degrees about 1/6 of the total scene is visible) and the cull visitor removes nodes from being drawn that cannot be seen.

Other visitors are supplied or can be user written for extended functions: intersect visitor - does a line segment intersect any part of the scene (for collisions) pick visitor - similar but takes a line derived from the current scene view to detect items which have been 'mouse picked'

you could write a visitor to replace the textures, geometry of selected items.

Ah, you're discussing the VisitorPattern and some form of branch pruning?


See GraphicsPatterns


EditText of this page (last edited March 19, 2006) or FindPage with title or text search