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::TexGenNode& 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]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 value_type getCalculatedNearPlane() const
[more]inline value_type getCalculatedFarPlane() const
[more]value_type computeNearestPointInFrustum(const osg::Matrix& matrix, const osg::Polytope::PlaneList& planes, const osg::Drawable& drawable)
[more]bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::BoundingBox& bb)
[more]bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable, bool isBillboard=false)
[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]virtual bool clampProjectionMatrixImplementation(osg::Matrixf& projection, double& znear, double& zfar) const
CullVisitor's default clamping of the projection float matrix to computed near and far values.
[more]virtual bool clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const
CullVisitor's default clamping of the projection double matrix to computed near and far values.
[more]inline bool clampProjectionMatrix(osg::Matrixf& projection, value_type& znear, value_type& zfar) const
clamp the projection float matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation
[more]inline bool clampProjectionMatrix(osg::Matrixd& projection, value_type& znear, value_type& zfar) const
clamp the projection double matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation
[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 void addPositionedTextureAttribute(unsigned int textureUnit, 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

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

Protected Classes

[more]struct MatrixPlanesDrawables

Protected Fields

[more]osg::ref_ptr<const osg::ClearNode> _clearNode
[more]osg::ref_ptr<RenderGraph> _rootRenderGraph
[more]RenderGraph* _currentRenderGraph
[more]osg::ref_ptr<RenderStage> _rootRenderStage
[more]RenderBin* _currentRenderBin
[more]value_type _computed_znear
[more]value_type _computed_zfar
[more]RenderLeafList _reuseRenderLeafList
[more]unsigned int _currentReuseRenderLeafIndex
[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager
[more]osg::ref_ptr<osg::State> _state
[more]DistanceMatrixDrawableMap _nearPlaneCandidateMap

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

[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList
[more]typedef std::multimap<value_type, MatrixPlanesDrawables> DistanceMatrixDrawableMap


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::TexGenNode& 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

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

oinline value_type getCalculatedFarPlane() const

ovalue_type computeNearestPointInFrustum(const osg::Matrix& matrix, const osg::Polytope::PlaneList& planes, const osg::Drawable& drawable)

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

obool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable, bool isBillboard=false)

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

ovirtual bool clampProjectionMatrixImplementation(osg::Matrixf& projection, double& znear, double& zfar) const
CullVisitor's default clamping of the projection float matrix to computed near and far values. Note, do not call this method directly, use clampProjectionMatrix(..) instead, unless you want to bypass the callback.

ovirtual bool clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const
CullVisitor's default clamping of the projection double matrix to computed near and far values. Note, do not call this method directly, use clampProjectionMatrix(..) instead, unless you want to bypass the callback.

oinline bool clampProjectionMatrix(osg::Matrixf& projection, value_type& znear, value_type& zfar) const
clamp the projection float matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation

oinline bool clampProjectionMatrix(osg::Matrixd& projection, value_type& znear, value_type& zfar) const
clamp the projection double matrix to computed near and far values, use callback if it exists, otherwise use default CullVisitro implemntation

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<const osg::ClearNode> _clearNode

oosg::ref_ptr<RenderGraph> _rootRenderGraph

oRenderGraph* _currentRenderGraph

oosg::ref_ptr<RenderStage> _rootRenderStage

oRenderBin* _currentRenderBin

ovalue_type _computed_znear

ovalue_type _computed_zfar

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

ostruct MatrixPlanesDrawables

o MatrixPlanesDrawables(const osg::Matrix& matrix, const osg::Drawable* drawable, const osg::Polytope& frustum)

o MatrixPlanesDrawables(const MatrixPlanesDrawables& mpd)

oMatrixPlanesDrawables& operator = (const MatrixPlanesDrawables& mpd)

oosg::Matrix _matrix

oconst osg::Drawable* _drawable

oosg::Polytope::PlaneList _planes

otypedef std::multimap<value_type, MatrixPlanesDrawables> DistanceMatrixDrawableMap

oDistanceMatrixDrawableMap _nearPlaneCandidateMap

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 void addPositionedTextureAttribute(unsigned int textureUnit, 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++.