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::ClipNode& 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::OccluderNode& node)
[more]virtual void apply(osg::Impostor& node)
[more]void setEarthSky(const osg::EarthSky* earthSky)
[more]const osg::EarthSky* getEarthSky() 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 setComputeNearFarMode(ComputeNearFarMode cnfm)
[more]ComputeNearFarMode getComputeNearFarMode() const
[more]void setTransparencySortMode(TransparencySortMode tsm)
[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]inline void setRenderGraph(RenderGraph* rg)
[more]inline RenderGraph* getRootRenderGraph()
[more]inline RenderGraph* getCurrentRenderGraph()
[more]inline void setRenderStage(RenderStage* rg)
[more]inline RenderStage* getRenderStage()
[more]inline RenderBin* getCurrentRenderBin()
[more]inline void setCurrentRenderBin(RenderBin* rb)
[more]inline const float getCalculatedNearPlane() const
[more]inline const float getCalculatedFarPlane() const
[more]void updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable)
[more]void updateCalculatedNearFar(const osg::Matrix& matrix, const osg::BoundingBox& bb)
[more]void updateCalculatedNearFar(const osg::Vec3& pos)
[more]void popProjectionMatrix()
reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far
[more]void setState(osg::State* state)
[more]osg::State* getState()
[more]const osg::State* getState() const
[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 graphAdd a drawable and depth to current render graph
[more]inline void addPositionedAttribute(osg::Matrix* matrix, const osg::StateAttribute* attr)
Add an attribute which is positioned related to the modelview matrixAdd an attribute which is positioned related to the modelview matrix
[more]inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* projection, osg::Matrix* matrix, float depth)

Public Members

[more]enum ComputeNearFarMode
[more]enum TransparencySortMode

Protected Fields

[more]osg::ref_ptr<RenderGraph> _rootRenderGraph
[more]RenderGraph* _currentRenderGraph
[more]osg::ref_ptr<RenderStage> _rootRenderStage
[more]RenderBin* _currentRenderBin
[more]ComputeNearFarMode _computeNearFar
[more]float _computed_znear
[more]float _computed_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 _currentReuseRenderLeafIndex
[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager
[more]osg::ref_ptr<osg::State> _state

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]osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node)
create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.

Protected Members

[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::ClipNode& 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::OccluderNode& node)

ovirtual void apply(osg::Impostor& node)

ovoid setEarthSky(const osg::EarthSky* earthSky)

oconst osg::EarthSky* getEarthSky() 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 ComputeNearFarMode

o DO_NOT_COMPUTE_NEAR_FAR

o COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES

o COMPUTE_NEAR_FAR_USING_PRIMITIVES

ovoid setComputeNearFarMode(ComputeNearFarMode cnfm)

oComputeNearFarMode getComputeNearFarMode() const

oenum TransparencySortMode

o LOOK_VECTOR_DISTANCE

o OBJECT_EYE_POINT_DISTANCE

ovoid setTransparencySortMode(TransparencySortMode tsm)

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.

oinline void setRenderGraph(RenderGraph* rg)

oinline RenderGraph* getRootRenderGraph()

oinline RenderGraph* getCurrentRenderGraph()

oinline void setRenderStage(RenderStage* rg)

oinline RenderStage* getRenderStage()

oinline RenderBin* getCurrentRenderBin()

oinline void setCurrentRenderBin(RenderBin* rb)

oinline const float getCalculatedNearPlane() const

oinline const float getCalculatedFarPlane() const

ovoid updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable)

ovoid updateCalculatedNearFar(const osg::Matrix& matrix, const osg::BoundingBox& bb)

ovoid updateCalculatedNearFar(const osg::Vec3& pos)

ovoid popProjectionMatrix()
reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far

ovoid setState(osg::State* state)

oosg::State* getState()

oconst osg::State* getState() 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)

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

oosg::ref_ptr<RenderGraph> _rootRenderGraph

oRenderGraph* _currentRenderGraph

oosg::ref_ptr<RenderStage> _rootRenderStage

oRenderBin* _currentRenderBin

oComputeNearFarMode _computeNearFar

ofloat _computed_znear

ofloat _computed_zfar

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

oTransparencySortMode _tsm

obool _impostorActive

obool _depthSortImpostorSprites

ofloat _impostorPixelErrorThreshold

oint _numFramesToKeepImpostorSprites

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

ounsigned int _currentReuseRenderLeafIndex

oosg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager

oosg::ref_ptr<osg::State> _state

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 graphAdd a drawable and depth to current render graph

oinline void addPositionedAttribute(osg::Matrix* matrix, const osg::StateAttribute* attr)
Add an attribute which is positioned related to the modelview matrixAdd an attribute which is positioned related to the modelview matrix

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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