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 osg::Vec3 getEyePoint() const
[more]virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const
[more]virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const
[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::ClearNode& node)
[more]virtual void apply(osg::OccluderNode& node)
[more]virtual void apply(osg::Impostor& node)
[more]void setClearNode(const osg::ClearNode* earthSky)
[more]const osg::ClearNode* getClearNode() const
[more]void setImpostorsActive(bool active)
Switch the creation of Impostors on or off.
[more]bool getImpostorsActive() const
Get whether impostors are active or not.
[more]void setImpostorPixelErrorThreshold(float numPixels)
Set the impostor error threshold.
[more]float getImpostorPixelErrorThreshold() const
Get the impostor error threshold
[more]void setDepthSortImpostorSprites(bool doDepthSort)
Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering
[more]bool setDepthSortImpostorSprites() const
Get whether ImpsotorSprite's are depth sorted bin for rendering
[more]void setNumberOfFrameToKeepImpostorSprites(int numFrames)
Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled
[more]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 setNearFarRatio(float ratio)
[more]float getNearFarRatio() const
[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 float getCalculatedNearPlane() const
[more]inline 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]virtual 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::RefMatrix* matrix)
Add a drawable to current render graph
[more]inline void addDrawableAndDepth(osg::Drawable* drawable, osg::RefMatrix* matrix, float depth)
Add a drawable and depth to current render graphAdd a drawable and depth to current render graph
[more]inline void addPositionedAttribute(osg::RefMatrix* 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::RefMatrix* projection, osg::RefMatrix* matrix, float depth)

Public Members

[more]typedef osg::Matrix::value_type value_type
[more]enum ComputeNearFarMode

Protected Fields

[more]osg::ref_ptr<RenderGraph> _rootRenderGraph
[more]RenderGraph* _currentRenderGraph
[more]osg::ref_ptr<RenderStage> _rootRenderStage
[more]RenderBin* _currentRenderBin
[more]ComputeNearFarMode _computeNearFar
[more]value_type _nearFarRatio
[more]value_type _computed_znear
[more]value_type _computed_zfar
[more]osg::ref_ptr<const osg::ClearNode> _clearNode
[more]bool _impostorActive
[more]bool _depthSortImpostorSprites
[more]float _impostorPixelErrorThreshold
[more]int _numFramesToKeepImpostorSprites
[more]RenderLeafList _reuseRenderLeafList
[more]unsigned int _currentReuseRenderLeafIndex
[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager
[more]osg::ref_ptr<osg::State> _state

Protected Methods

[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


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.
otypedef osg::Matrix::value_type value_type

o CullVisitor()

ovirtual ~CullVisitor()

ovirtual CullVisitor* cloneType() const

ovirtual void reset()

ovirtual osg::Vec3 getEyePoint() const

ovirtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const

ovirtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const

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::ClearNode& node)

ovirtual void apply(osg::OccluderNode& node)

ovirtual void apply(osg::Impostor& node)

ovoid setClearNode(const osg::ClearNode* earthSky)

oconst osg::ClearNode* getClearNode() const

ovoid setImpostorsActive(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.

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

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

ofloat getImpostorPixelErrorThreshold() const
Get the impostor error threshold

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

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

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

oint 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

ovoid setNearFarRatio(float ratio)

ofloat getNearFarRatio() const

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 float getCalculatedNearPlane() const

oinline 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)

ovirtual void 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

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

ovalue_type _nearFarRatio

ovalue_type _computed_znear

ovalue_type _computed_zfar

oosg::ref_ptr<const osg::ClearNode> _clearNode

obool _impostorActive

obool _depthSortImpostorSprites

ofloat _impostorPixelErrorThreshold

oint _numFramesToKeepImpostorSprites

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

oRenderLeafList _reuseRenderLeafList

ounsigned int _currentReuseRenderLeafIndex

oosg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager

oosg::ref_ptr<osg::State> _state

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

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

oinline void addPositionedAttribute(osg::RefMatrix* 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::RefMatrix* projection, osg::RefMatrix* 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++.