Basic NodeVisitor implementation for rendering a scene.
Inheritance:
Public Methods
-
CullVisitor()
-
virtual ~CullVisitor()
-
virtual CullVisitor* cloneType() const
-
virtual void reset()
-
virtual osg::Vec3 getEyePoint() const
-
virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const
-
virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const
-
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::TexGenNode& 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
-
inline void pushStateSet(const osg::StateSet* ss)
- Push state set on the current state group.
-
inline void popStateSet()
- Pop the top state set and hence associated state group.
-
inline void setRenderGraph(RenderGraph* rg)
-
inline RenderGraph* getRootRenderGraph()
-
inline RenderGraph* getCurrentRenderGraph()
-
inline void setRenderStage(RenderStage* rg)
-
inline RenderStage* getRenderStage()
-
inline RenderBin* getCurrentRenderBin()
-
inline void setCurrentRenderBin(RenderBin* rb)
-
inline value_type getCalculatedNearPlane() const
-
inline value_type getCalculatedFarPlane() const
-
value_type computeNearestPointInFrustum(const osg::Matrix& matrix, const osg::Polytope::PlaneList& planes, const osg::Drawable& drawable)
-
bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::BoundingBox& bb)
-
bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable, bool isBillboard=false)
-
void updateCalculatedNearFar(const osg::Vec3& pos)
-
virtual void popProjectionMatrix()
- reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far
-
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.
-
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.
-
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
-
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
-
void setState(osg::State* state)
-
osg::State* getState()
-
const osg::State* getState() const
-
inline void addDrawable(osg::Drawable* drawable, osg::RefMatrix* matrix)
- Add a drawable to current render graph
-
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
-
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
-
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
-
inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::RefMatrix* projection, osg::RefMatrix* matrix, float depth)
Public
-
typedef osg::Matrix::value_type value_type
Protected Classes
-
struct MatrixPlanesDrawables
Protected Fields
-
osg::ref_ptr<const osg::ClearNode> _clearNode
-
osg::ref_ptr<RenderGraph> _rootRenderGraph
-
RenderGraph* _currentRenderGraph
-
osg::ref_ptr<RenderStage> _rootRenderStage
-
RenderBin* _currentRenderBin
-
value_type _computed_znear
-
value_type _computed_zfar
-
RenderLeafList _reuseRenderLeafList
-
unsigned int _currentReuseRenderLeafIndex
-
osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager
-
osg::ref_ptr<osg::State> _state
-
DistanceMatrixDrawableMap _nearPlaneCandidateMap
Protected Methods
-
CullVisitor& operator = (const CullVisitor&)
- prevent unwanted copy operator
-
inline void handle_cull_callbacks_and_traverse(osg::Node& node)
-
inline 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.
Protected
-
typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList
-
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.
- typedef osg::Matrix::value_type value_type
- CullVisitor()
- virtual ~CullVisitor()
- virtual CullVisitor* cloneType() const
- virtual void reset()
- virtual osg::Vec3 getEyePoint() const
- virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const
- virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const
- 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::TexGenNode& 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
- inline 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.
- inline 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.
- inline void setRenderGraph(RenderGraph* rg)
- inline RenderGraph* getRootRenderGraph()
- inline RenderGraph* getCurrentRenderGraph()
- inline void setRenderStage(RenderStage* rg)
- inline RenderStage* getRenderStage()
- inline RenderBin* getCurrentRenderBin()
- inline void setCurrentRenderBin(RenderBin* rb)
- inline value_type getCalculatedNearPlane() const
- inline value_type getCalculatedFarPlane() const
- value_type computeNearestPointInFrustum(const osg::Matrix& matrix, const osg::Polytope::PlaneList& planes, const osg::Drawable& drawable)
- bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::BoundingBox& bb)
- bool updateCalculatedNearFar(const osg::Matrix& matrix, const osg::Drawable& drawable, bool isBillboard=false)
- void updateCalculatedNearFar(const osg::Vec3& pos)
- virtual void popProjectionMatrix()
- reimplement CullStack's popProjectionMatrix() adding clamping of the projection matrix to the computed near and far
- 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.
Note, do not call this method directly, use clampProjectionMatrix(..) instead, unless you want to bypass the callback.
- 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.
Note, do not call this method directly, use clampProjectionMatrix(..) instead, unless you want to bypass the callback.
- 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
- 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
- void setState(osg::State* state)
- osg::State* getState()
- const osg::State* getState() const
- CullVisitor& operator = (const CullVisitor&)
- prevent unwanted copy operator
- inline void handle_cull_callbacks_and_traverse(osg::Node& node)
- inline 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.
- osg::ref_ptr<const osg::ClearNode> _clearNode
- osg::ref_ptr<RenderGraph> _rootRenderGraph
- RenderGraph* _currentRenderGraph
- osg::ref_ptr<RenderStage> _rootRenderStage
- RenderBin* _currentRenderBin
- value_type _computed_znear
- value_type _computed_zfar
- typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList
- RenderLeafList _reuseRenderLeafList
- unsigned int _currentReuseRenderLeafIndex
- osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager
- osg::ref_ptr<osg::State> _state
- struct MatrixPlanesDrawables
- MatrixPlanesDrawables(const osg::Matrix& matrix, const osg::Drawable* drawable, const osg::Polytope& frustum)
- MatrixPlanesDrawables(const MatrixPlanesDrawables& mpd)
- MatrixPlanesDrawables& operator = (const MatrixPlanesDrawables& mpd)
- osg::Matrix _matrix
- const osg::Drawable* _drawable
- osg::Polytope::PlaneList _planes
- typedef std::multimap<value_type, MatrixPlanesDrawables> DistanceMatrixDrawableMap
- DistanceMatrixDrawableMap _nearPlaneCandidateMap
- inline void addDrawable(osg::Drawable* drawable, osg::RefMatrix* matrix)
- Add a drawable to current render graph
- 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
- 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
- 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
- inline 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++.