Public Types |
| enum | ComputeNearFarMode { DO_NOT_COMPUTE_NEAR_FAR = 0,
COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES,
COMPUTE_NEAR_FAR_USING_PRIMITIVES
} |
| enum | TransparencySortMode { LOOK_VECTOR_DISTANCE,
OBJECT_EYE_POINT_DISTANCE
} |
Public Methods |
| | CullVisitor () |
| virtual | ~CullVisitor () |
| virtual CullVisitor * | cloneType () const |
| virtual void | reset () |
| virtual void | apply (osg::Node &) |
| virtual void | apply (osg::Geode &node) |
| virtual void | apply (osg::Billboard &node) |
| virtual void | apply (osg::LightSource &node) |
| virtual void | apply (osg::ClipNode &node) |
| virtual void | apply (osg::Group &node) |
| virtual void | apply (osg::Transform &node) |
| virtual void | apply (osg::Projection &node) |
| virtual void | apply (osg::Switch &node) |
| virtual void | apply (osg::LOD &node) |
| virtual void | apply (osg::ClearNode &node) |
| virtual void | apply (osg::OccluderNode &node) |
| virtual void | apply (osg::Impostor &node) |
| void | setClearNode (const osg::ClearNode *earthSky) |
| const osg::ClearNode * | getClearNode () const |
| void | setImpostorsActive (const bool active) |
| | Switch the creation of Impostors on or off.
|
| const bool | getImpostorsActive () const |
| | Get whether impostors are active or not.
|
| void | setImpostorPixelErrorThreshold (const float numPixels) |
| | Set the impostor error threshold.
|
| const float | getImpostorPixelErrorThreshold () const |
| | Get the impostor error threshold.
|
| void | setDepthSortImpostorSprites (const bool doDepthSort) |
| | Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering.
|
| const bool | setDepthSortImpostorSprites () const |
| | Get whether ImpsotorSprite's are depth sorted bin for rendering.
|
| void | setNumberOfFrameToKeepImpostorSprites (const int numFrames) |
| | Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled.
|
| const int | getNumberOfFrameToKeepImpostorSprites () const |
| | Get the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled.
|
| void | setComputeNearFarMode (ComputeNearFarMode cnfm) |
| ComputeNearFarMode | getComputeNearFarMode () const |
| void | setTransparencySortMode (TransparencySortMode tsm) |
| void | pushStateSet (const osg::StateSet *ss) |
| | Push state set on the current state group.
|
| void | popStateSet () |
| | Pop the top state set and hence associated state group.
|
| void | setRenderGraph (RenderGraph *rg) |
| RenderGraph * | getRootRenderGraph () |
| RenderGraph * | getCurrentRenderGraph () |
| void | setRenderStage (RenderStage *rg) |
| RenderStage * | getRenderStage () |
| RenderBin * | getCurrentRenderBin () |
| void | setCurrentRenderBin (RenderBin *rb) |
| const float | getCalculatedNearPlane () const |
| const float | getCalculatedFarPlane () const |
| void | updateCalculatedNearFar (const osg::Matrix &matrix, const osg::Drawable &drawable) |
| void | updateCalculatedNearFar (const osg::Matrix &matrix, const osg::BoundingBox &bb) |
| void | updateCalculatedNearFar (const osg::Vec3 &pos) |
| void | addDrawable (osg::Drawable *drawable, osg::Matrix *matrix) |
| | Add a drawable to current render graph.
|
| void | addDrawableAndDepth (osg::Drawable *drawable, osg::Matrix *matrix, const float depth) |
| | Add a drawable and depth to current render graph.
|
| void | addPositionedAttribute (osg::Matrix *matrix, const osg::StateAttribute *attr) |
| | Add an attribute which is positioned related to the modelview matrix.
|
| void | popProjectionMatrix () |
| | reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far.
|
| void | setState (osg::State *state) |
| osg::State * | getState () |
| const osg::State * | getState () const |
Protected Types |
typedef std::vector< osg::ref_ptr<
RenderLeaf > > | RenderLeafList |
Protected Methods |
| | CullVisitor (const CullVisitor &) |
| | prevent unwanted copy construction.
|
| CullVisitor & | operator= (const CullVisitor &) |
| | prevent unwanted copy operator.
|
| void | handle_cull_callbacks_and_traverse (osg::Node &node) |
| void | handle_cull_callbacks_and_accept (osg::Node &node, osg::Node *acceptNode) |
| osg::ImpostorSprite * | createImpostorSprite (osg::Impostor &node) |
| | create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.
|
| RenderLeaf * | createOrReuseRenderLeaf (osg::Drawable *drawable, osg::Matrix *projection, osg::Matrix *matrix, float depth=0.0f) |
Protected Attributes |
| osg::ref_ptr< RenderGraph > | _rootRenderGraph |
| RenderGraph * | _currentRenderGraph |
| osg::ref_ptr< RenderStage > | _rootRenderStage |
| RenderBin * | _currentRenderBin |
| ComputeNearFarMode | _computeNearFar |
| float | _computed_znear |
| float | _computed_zfar |
| osg::ref_ptr< const osg::ClearNode > | _clearNode |
| TransparencySortMode | _tsm |
| bool | _impostorActive |
| bool | _depthSortImpostorSprites |
| float | _impostorPixelErrorThreshold |
| int | _numFramesToKeepImpostorSprites |
| RenderLeafList | _reuseRenderLeafList |
| unsigned int | _currentReuseRenderLeafIndex |
| osg::ref_ptr< osg::ImpostorSpriteManager > | _impostorSpriteManager |
| osg::ref_ptr< osg::State > | _state |
This visitor traverses the scene graph, collecting transparent and opaque osg::Drawables into a depth sorted transparent bin and a state sorted opaque bin. The opaque bin is rendered first, and then the transparent bin in rendered in order from the furthest osg::Drawable from the eye to the one nearest the eye.