class OSGUTIL_EXPORT osgUtil::RenderVisitor: public osg::NodeVisitor

Basic NodeVisitor implementation for rendering a scene.

Inheritance:


Public Classes

[more]enum TransparencySortMode
[more]enum CullingType

Public Methods

[more] RenderVisitor()
[more]virtual ~RenderVisitor()
[more]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::DCS& node)
[more]virtual void apply(osg::Switch& node)
[more]virtual void apply(osg::LOD& node)
[more]virtual void apply(osg::Scene& node)
[more]void setGlobalState(osg::GeoState* global)
[more]void setPerspective(const osg::Camera& camera)
[more]void setPerspective(float fovy, float aspect, float znear, float zfar)
[more]void setLookAt(const osg::Camera& camera)
[more]void setLookAt(const osg::Vec3& eye, const osg::Vec3& center, const osg::Vec3& upVector)
[more]void setLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
[more]void setLODBias(float bias)
[more]float getLODBias()
[more]void setTransparencySortMode(TransparencySortMode tsm)
[more]void setCullingActive(CullingType ct, bool active)
Enables/disables the specified culling type.
[more]bool getCullingActive(CullingType ct)
Returns the state of the specified culling type.
[more]bool calcNearFar(double& near_plane, double& far_plane)
Calculates the near_plane and the far_plane for the current camera view depending on the objects currently stored in the opaque and transparent bins.
[more]void render()
Renders the osg::GeoSets that were collected in the opaque and transparent bins before

Protected Fields

[more]bool _viewFrustumCullingActive
[more]bool _smallFeatureCullingActive
[more]ViewStateStack _viewStateStack
[more]ViewState* _tvs
[more]ViewState* _cvs
[more]OpaqueList _opaqueGeoSets
[more]TransparentList _transparentGeoSets
[more]LightList _lights
[more]osg::GeoState* _globalState
[more]float _LODBias
[more]float _fovy
[more]float _aspect
[more]float _znear
[more]float _zfar
[more]osg::Vec3 _frustumTop
[more]osg::Vec3 _frustumBottom
[more]osg::Vec3 _frustumLeft
[more]osg::Vec3 _frustumRight
[more]TransparencySortMode _tsm

Protected Methods

[more]void pushMatrix(const osg::Matrix& matrix)
[more]void popMatrix()
[more]osg::Matrix* getCurrentMatrix()
[more]osg::Matrix* getInverseCurrentMatrix()
[more]const osg::Vec3& getEyeLocal()
[more]const osg::Vec3& getCenterLocal()
[more]const osg::Vec3& getLookVectorLocal()
[more]bool isCulled(const osg::BoundingSphere& sp)
[more]bool isCulled(const osg::BoundingBox& bb)
[more]void calculateClippingPlanes()

Protected

[more]typedef std::pair<osg::Matrix*,osg::GeoSet*> MatrixGeoSet
[more]typedef std::vector<ViewState*> ViewStateStack
[more]typedef std::multimap<osg::GeoState*,MatrixGeoSet> OpaqueList
[more]typedef std::multimap<float,MatrixGeoSet> TransparentList
[more]typedef std::map<osg::Matrix*,osg::Light*> LightList


Documentation

Basic NodeVisitor implementation for rendering a scene. This visitor traverses the scene graph, collecting transparent and opaque osg::GeoSets 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::GeoSet from the eye to the one nearest the eye.
o RenderVisitor()

ovirtual ~RenderVisitor()

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

ovirtual void apply(osg::Switch& node)

ovirtual void apply(osg::LOD& node)

ovirtual void apply(osg::Scene& node)

ovoid setGlobalState(osg::GeoState* global)

ovoid setPerspective(const osg::Camera& camera)

ovoid setPerspective(float fovy, float aspect, float znear, float zfar)

ovoid setLookAt(const osg::Camera& camera)

ovoid setLookAt(const osg::Vec3& eye, const osg::Vec3& center, const osg::Vec3& upVector)

ovoid setLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)

ovoid setLODBias(float bias)

ofloat getLODBias()

oenum TransparencySortMode

o LOOK_VECTOR_DISTANCE

o OBJECT_EYE_POINT_DISTANCE

ovoid setTransparencySortMode(TransparencySortMode tsm)

oenum CullingType

o VIEW_FRUSTUM_CULLING

o SMALL_FEATURE_CULLING

ovoid setCullingActive(CullingType ct, bool active)
Enables/disables the specified culling type.
Parameters:
ct - The culling type to enable/disable.
active - true enables the culling type, false disables.

obool getCullingActive(CullingType ct)
Returns the state of the specified culling type. @result true, if culling type is enabled, false otherwise.

obool calcNearFar(double& near_plane, double& far_plane)
Calculates the near_plane and the far_plane for the current camera view depending on the objects currently stored in the opaque and transparent bins.
Parameters:
near_plane - reference to a variable that can store the near plane result.
far_plane - reference to a variable that can store the far plane result. @result true, if near_plane and far_plane contain valid values, false otherwise.

ovoid render()
Renders the osg::GeoSets that were collected in the opaque and transparent bins before

ovoid pushMatrix(const osg::Matrix& matrix)

ovoid popMatrix()

oosg::Matrix* getCurrentMatrix()

oosg::Matrix* getInverseCurrentMatrix()

oconst osg::Vec3& getEyeLocal()

oconst osg::Vec3& getCenterLocal()

oconst osg::Vec3& getLookVectorLocal()

obool _viewFrustumCullingActive

obool _smallFeatureCullingActive

obool isCulled(const osg::BoundingSphere& sp)

obool isCulled(const osg::BoundingBox& bb)

otypedef std::pair<osg::Matrix*,osg::GeoSet*> MatrixGeoSet

otypedef std::vector<ViewState*> ViewStateStack

oViewStateStack _viewStateStack

oViewState* _tvs

oViewState* _cvs

otypedef std::multimap<osg::GeoState*,MatrixGeoSet> OpaqueList

otypedef std::multimap<float,MatrixGeoSet> TransparentList

otypedef std::map<osg::Matrix*,osg::Light*> LightList

oOpaqueList _opaqueGeoSets

oTransparentList _transparentGeoSets

oLightList _lights

oosg::GeoState* _globalState

ofloat _LODBias

ofloat _fovy

ofloat _aspect

ofloat _znear

ofloat _zfar

ovoid calculateClippingPlanes()

oosg::Vec3 _frustumTop

oosg::Vec3 _frustumBottom

oosg::Vec3 _frustumLeft

oosg::Vec3 _frustumRight

oTransparencySortMode _tsm


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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