class OSGUTIL_EXPORT osgUtil::CullVisitor

Basic NodeVisitor implementation for rendering a scene.

Inheritance:


Public Methods

[more] CullVisitor()
[more]virtual ~CullVisitor()
[more]virtual CullVisitor* cloneType() const
[more]virtual void reset()
[more]virtual void apply(osg::Node&)
[more]virtual void apply(osg::Geode& node)
[more]virtual void apply(osg::Billboard& node)
[more]virtual void apply(osg::LightSource& node)
[more]virtual void apply(osg::Group& node)
[more]virtual void apply(osg::Transform& node)
[more]virtual void apply(osg::Projection& node)
[more]virtual void apply(osg::Switch& node)
[more]virtual void apply(osg::LOD& node)
[more]virtual void apply(osg::EarthSky& node)
[more]virtual void apply(osg::Impostor& node)
[more]void setEarthSky(const osg::EarthSky* earthSky)
[more]const osg::EarthSky* getEarthSky() const
[more]void setLODBias(const float bias)
[more]const float getLODBias() const
[more]void setImpostorsActive(const bool active)
Switch the creation of Impostors on or off.
[more]const bool getImpostorsActive() const
Get whether impostors are active or not.
[more]void setImpostorPixelErrorThreshold(const float numPixels)
Set the impostor error threshold.
[more]const float getImpostorPixelErrorThreshold() const
Get the impostor error threshold
[more]void setDepthSortImpostorSprites(const bool doDepthSort)
Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering
[more]const bool setDepthSortImpostorSprites() const
Get whether ImpsotorSprite's are depth sorted bin for rendering
[more]void setNumberOfFrameToKeepImpostorSprites(const int numFrames)
Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled
[more]const int getNumberOfFrameToKeepImpostorSprites() const
Get the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled
[more]void setTransparencySortMode(TransparencySortMode tsm)
[more]void setCullingMode(CullViewState::CullingMode mode)
Sets the current CullingMode
[more]CullViewState::CullingMode getCullingMode() const
Returns the current CullingMode
[more]void pushViewport(osg::Viewport* viewport)
[more]void popViewport()
[more]void pushProjectionMatrix(osg::Matrix* matrix)
[more]void popProjectionMatrix()
[more]void pushModelViewMatrix(osg::Matrix* matrix)
[more]void popModelViewMatrix()
[more]inline void pushStateSet(const osg::StateSet* ss)
Push state set on the current state group.
[more]inline void popStateSet()
Pop the top state set and hence associated state group.
[more]void setRenderGraph(RenderGraph* rg)
[more]RenderGraph* getRenderGraph()
[more]void setRenderStage(RenderStage* rg)
[more]RenderStage* getRenderStage()
[more]const float getCalculatedNearPlane() const
[more]const float getCalculatedFarPlane() const

Public Members

[more]enum TransparencySortMode

Protected Fields

[more]MatrixStack _PW_Stack
[more]ClippingVolumeStack _projectionClippingVolumeStack
[more]MatrixStack _modelviewStack
[more]MatrixStack _MVPW_Stack
[more]ClippingVolumeStack _modelviewClippingVolumeStack
[more]unsigned int _bbCornerNear
[more]unsigned int _bbCornerFar
[more]osg::Matrix _identity
[more]osg::ref_ptr<RenderGraph> _rootRenderGraph
[more]RenderGraph* _currentRenderGraph
[more]osg::ref_ptr<RenderStage> _rootRenderStage
[more]RenderBin* _currentRenderBin
[more]float _LODBias
[more]float _calculated_znear
[more]float _calculated_zfar
[more]osg::ref_ptr<const osg::EarthSky> _earthSky
[more]TransparencySortMode _tsm
[more]bool _impostorActive
[more]bool _depthSortImpostorSprites
[more]float _impostorPixelErrorThreshold
[more]int _numFramesToKeepImpostorSprites
[more]unsigned int _currentReuseMatrixIndex
[more]unsigned int _currentReuseRenderLeafIndex
[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager

Protected Methods

[more] CullVisitor(const CullVisitor&)
prevent unwanted copy construction
[more]CullVisitor& operator = (const CullVisitor&)
prevent unwanted copy operator
[more]inline void handle_cull_callbacks_and_traverse(osg::Node& node)
[more]inline void handle_cull_callbacks_and_accept(osg::Node& node, osg::Node* acceptNode)
[more]inline osg::Matrix* getCurrentMatrix()
[more]inline const osg::Vec3& getEyeLocal() const
[more]inline const osg::Vec3 getUpLocal() const
[more]inline const osg::Vec3 getLookVectorLocal() const
[more]inline bool isCulled(const osg::BoundingSphere& sp, CullViewState::CullingMode& mode) const
[more]inline const bool isCulled(const osg::BoundingBox& bb, CullViewState::CullingMode mode) const
[more]void updateCalculatedNearFar(const osg::BoundingBox& bb)
[more]void updateCalculatedNearFar(const osg::Vec3& pos)
[more]inline void addDrawable(osg::Drawable* drawable, osg::Matrix* matrix)
Add a drawable to current render graph
[more]inline void addDrawableAndDepth(osg::Drawable* drawable, osg::Matrix* matrix, const float depth)
Add a drawable and depth to current render graph
[more]inline void addLight(osg::Light* light, osg::Matrix* matrix)
Add a light to current render graph
[more]osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node)
create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.
[more]osg::Viewport* getViewport()
[more]osg::Matrix& getModelViewMatrix()
[more]osg::Matrix& getProjectionMatrix()
[more]const osg::Matrix getWindowMatrix()
[more]const osg::Matrix& getMVPW()
[more]void pushClippingVolume()
[more]void popClippingVolume()
[more]inline osg::Matrix* createOrReuseMatrix(const osg::Matrix value)
[more]inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* projection, osg::Matrix* matrix, float depth=0.0f)

Protected Members

[more]typedef std::vector<osg::ref_ptr<osg::Matrix> > MatrixStack MatrixStack _projectionStack
[more]typedef std::vector<osg::ref_ptr<osg::Viewport> > ViewportStack ViewportStack _viewportStack
[more]typedef std::vector<osg::Vec3> EyePointStack EyePointStack _eyePointStack
[more]typedef std::vector<CullViewState::CullingMode> CullingModeStack CullingModeStack _cullingModeStack
[more]typedef std::vector< osg::ref_ptr<osg::Matrix> > MatrixList MatrixList _reuseMatrixList
[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList RenderLeafList _reuseRenderLeafList


Documentation

Basic NodeVisitor implementation for rendering a scene. 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.
o CullVisitor()

ovirtual ~CullVisitor()

ovirtual CullVisitor* cloneType() const

ovirtual void reset()

ovirtual void apply(osg::Node&)

ovirtual void apply(osg::Geode& node)

ovirtual void apply(osg::Billboard& node)

ovirtual void apply(osg::LightSource& node)

ovirtual void apply(osg::Group& node)

ovirtual void apply(osg::Transform& node)

ovirtual void apply(osg::Projection& node)

ovirtual void apply(osg::Switch& node)

ovirtual void apply(osg::LOD& node)

ovirtual void apply(osg::EarthSky& node)

ovirtual void apply(osg::Impostor& node)

ovoid setEarthSky(const osg::EarthSky* earthSky)

oconst osg::EarthSky* getEarthSky() const

ovoid setLODBias(const float bias)

oconst float getLODBias() const

ovoid setImpostorsActive(const bool active)
Switch the creation of Impostors on or off. Setting active to false forces the CullVisitor to use the Impostor LOD children for rendering. Setting active to true forces the CullVisitor to create the appropriate pre-rendering stages which render to the ImpostorSprite's texture.

oconst bool getImpostorsActive() const
Get whether impostors are active or not.

ovoid setImpostorPixelErrorThreshold(const float numPixels)
Set the impostor error threshold. Used in calculation of whether impostors remain valid.

oconst float getImpostorPixelErrorThreshold() const
Get the impostor error threshold

ovoid setDepthSortImpostorSprites(const bool doDepthSort)
Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering

oconst bool setDepthSortImpostorSprites() const
Get whether ImpsotorSprite's are depth sorted bin for rendering

ovoid setNumberOfFrameToKeepImpostorSprites(const int numFrames)
Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled

oconst int getNumberOfFrameToKeepImpostorSprites() const
Get the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled

oenum TransparencySortMode

o LOOK_VECTOR_DISTANCE

o OBJECT_EYE_POINT_DISTANCE

ovoid setTransparencySortMode(TransparencySortMode tsm)

ovoid setCullingMode(CullViewState::CullingMode mode)
Sets the current CullingMode

oCullViewState::CullingMode getCullingMode() const
Returns the current CullingMode

ovoid pushViewport(osg::Viewport* viewport)

ovoid popViewport()

ovoid pushProjectionMatrix(osg::Matrix* matrix)

ovoid popProjectionMatrix()

ovoid pushModelViewMatrix(osg::Matrix* matrix)

ovoid popModelViewMatrix()

oinline void pushStateSet(const osg::StateSet* ss)
Push state set on the current state group. If the state exists in a child state group of the current state group then move the current state group to that child. Otherwise, create a new state group for the state set, add it to the current state group then move the current state group pointer to the new state group.

oinline void popStateSet()
Pop the top state set and hence associated state group. Move the current state group to the parent of the popped state group.

ovoid setRenderGraph(RenderGraph* rg)

oRenderGraph* getRenderGraph()

ovoid setRenderStage(RenderStage* rg)

oRenderStage* getRenderStage()

oconst float getCalculatedNearPlane() const

oconst float getCalculatedFarPlane() const

o CullVisitor(const CullVisitor&)
prevent unwanted copy construction

oCullVisitor& operator = (const CullVisitor&)
prevent unwanted copy operator

oinline void handle_cull_callbacks_and_traverse(osg::Node& node)

oinline void handle_cull_callbacks_and_accept(osg::Node& node, osg::Node* acceptNode)

oinline osg::Matrix* getCurrentMatrix()

oinline const osg::Vec3& getEyeLocal() const

oinline const osg::Vec3 getUpLocal() const

oinline const osg::Vec3 getLookVectorLocal() const

oinline bool isCulled(const osg::BoundingSphere& sp, CullViewState::CullingMode& mode) const

oinline const bool isCulled(const osg::BoundingBox& bb, CullViewState::CullingMode mode) const

ovoid updateCalculatedNearFar(const osg::BoundingBox& bb)

ovoid updateCalculatedNearFar(const osg::Vec3& pos)

oinline void addDrawable(osg::Drawable* drawable, osg::Matrix* matrix)
Add a drawable to current render graph

oinline void addDrawableAndDepth(osg::Drawable* drawable, osg::Matrix* matrix, const float depth)
Add a drawable and depth to current render graph

oinline void addLight(osg::Light* light, osg::Matrix* matrix)
Add a light to current render graph

oosg::ImpostorSprite* createImpostorSprite(osg::Impostor& node)
create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.

oosg::Viewport* getViewport()

oosg::Matrix& getModelViewMatrix()

oosg::Matrix& getProjectionMatrix()

oconst osg::Matrix getWindowMatrix()

oconst osg::Matrix& getMVPW()

ovoid pushClippingVolume()

ovoid popClippingVolume()

otypedef std::vector<osg::ref_ptr<osg::Matrix> > MatrixStack MatrixStack _projectionStack

oMatrixStack _PW_Stack

oClippingVolumeStack _projectionClippingVolumeStack

oMatrixStack _modelviewStack

oMatrixStack _MVPW_Stack

oClippingVolumeStack _modelviewClippingVolumeStack

otypedef std::vector<osg::ref_ptr<osg::Viewport> > ViewportStack ViewportStack _viewportStack

otypedef std::vector<osg::Vec3> EyePointStack EyePointStack _eyePointStack

otypedef std::vector<CullViewState::CullingMode> CullingModeStack CullingModeStack _cullingModeStack

ounsigned int _bbCornerNear

ounsigned int _bbCornerFar

oosg::Matrix _identity

oosg::ref_ptr<RenderGraph> _rootRenderGraph

oRenderGraph* _currentRenderGraph

oosg::ref_ptr<RenderStage> _rootRenderStage

oRenderBin* _currentRenderBin

ofloat _LODBias

ofloat _calculated_znear

ofloat _calculated_zfar

oosg::ref_ptr<const osg::EarthSky> _earthSky

oTransparencySortMode _tsm

obool _impostorActive

obool _depthSortImpostorSprites

ofloat _impostorPixelErrorThreshold

oint _numFramesToKeepImpostorSprites

otypedef std::vector< osg::ref_ptr<osg::Matrix> > MatrixList MatrixList _reuseMatrixList

ounsigned int _currentReuseMatrixIndex

oinline osg::Matrix* createOrReuseMatrix(const osg::Matrix value)

otypedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList RenderLeafList _reuseRenderLeafList

ounsigned int _currentReuseRenderLeafIndex

oinline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* projection, osg::Matrix* matrix, float depth=0.0f)

oosg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.