Basic NodeVisitor implementation for rendering a scene.
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.
virtual ~RenderVisitor()
void reset()
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::Group& node)
virtual void apply(osg::DCS& node)
virtual void apply(osg::Switch& node)
virtual void apply(osg::LOD& node)
virtual void apply(osg::Scene& node)
void setGlobalState(osg::GeoState* global)
void setPerspective(const osg::Camera& camera)
void setPerspective(float fovy, float aspect, float znear, float zfar)
void setLookAt(const osg::Camera& camera)
void setLookAt(const osg::Vec3& eye, const osg::Vec3& center, const osg::Vec3& upVector)
void setLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
void setLODBias(float bias)
float getLODBias()
enum TransparencySortMode
void setTransparencySortMode(TransparencySortMode tsm)
enum CullingType
void setCullingActive(CullingType ct, bool active)
active - true enables the culling type, false disables.
bool getCullingActive(CullingType ct)
bool calcNearFar(double& near_plane, double& far_plane)
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.
void render()
void pushMatrix(const osg::Matrix& matrix)
void popMatrix()
osg::Matrix* getCurrentMatrix()
osg::Matrix* getInverseCurrentMatrix()
const osg::Vec3& getEyeLocal()
const osg::Vec3& getCenterLocal()
const osg::Vec3& getLookVectorLocal()
bool _viewFrustumCullingActive
bool _smallFeatureCullingActive
bool isCulled(const osg::BoundingSphere& sp)
bool isCulled(const osg::BoundingBox& bb)
typedef std::pair<osg::Matrix*,osg::GeoSet*> MatrixGeoSet
typedef std::vector<ViewState*> ViewStateStack
ViewStateStack _viewStateStack
ViewState* _tvs
ViewState* _cvs
typedef std::multimap<osg::GeoState*,MatrixGeoSet> OpaqueList
typedef std::multimap<float,MatrixGeoSet> TransparentList
typedef std::map<osg::Matrix*,osg::Light*> LightList
OpaqueList _opaqueGeoSets
TransparentList _transparentGeoSets
LightList _lights
osg::GeoState* _globalState
float _LODBias
float _fovy
float _aspect
float _znear
float _zfar
void calculateClippingPlanes()
osg::Vec3 _frustumTop
Alphabetic index HTML hierarchy of classes or Java