SceneView is literaly a view of a scene, encapsulating the camera, global state, lights and the scene itself.
Inheritance:
Public Methods
-
SceneView()
- Constrcut a default scene view
-
void setDefaults()
- Set scene view to use default global state, light, camera and render visitor
-
void setSceneData(osg::Node* node)
- Set the data which to view.
-
osg::Node* getSceneData()
- Get the scene data which to view.
-
const osg::Node* getSceneData() const
- Get the const scene data which to view.
-
void setViewport(osg::Viewport* viewport)
- Set the viewport of the scene view to use specfied osg::Viewport.
-
void setViewport(int x, int y, int width, int height)
- Set the viewport of the scene view to specified dimensions.
-
const osg::Viewport* getViewport() const
- Get the const viewport.
-
osg::Viewport* getViewport()
- Get the viewport.
-
void getViewport(int& x, int& y, int& width, int& height)
- Get the viewport of the scene view.
-
void setBackgroundColor(const osg::Vec4& color)
- Set the background color used in glClearColor().
-
const osg::Vec4& getBackgroundColor() const
- Get the background color
-
void setGlobalState(osg::StateSet* state)
-
osg::StateSet* getGlobalState()
-
const osg::StateSet* getGlobalState() const
-
void setLightingMode(LightingMode mode)
-
LightingMode getLightingMode() const
-
void setLight(osg::Light* light)
-
osg::Light* getLight()
-
const osg::Light* getLight() const
-
void setCamera(osg::Camera* camera)
-
osg::Camera* getCamera()
-
const osg::Camera* getCamera() const
-
void setState(osg::State* state)
-
osg::State* getState()
-
const osg::State* getState() const
-
void setAppVisitor(osg::NodeVisitor* av)
-
osg::NodeVisitor* getAppVisitor()
-
const osg::NodeVisitor* getAppVisitor() const
-
void setCullVisitor(osgUtil::CullVisitor* cv)
-
osgUtil::CullVisitor* getCullVisitor()
-
const osgUtil::CullVisitor* getCullVisitor() const
-
void setRenderGraph(osgUtil::RenderGraph* rg)
-
osgUtil::RenderGraph* getRenderGraph()
-
const osgUtil::RenderGraph* getRenderGraph() const
-
void setRenderStage(osgUtil::RenderStage* rs)
-
osgUtil::RenderStage* getRenderStage()
-
const osgUtil::RenderStage* getRenderStage() const
-
void setLODBias(float bias)
-
float getLODBias() const
-
void setCalcNearFar(bool calc)
- Set to true if you want SceneView to automatically calculate values for the near/far clipping planes, each frame, set false to use camera's internal near and far planes.
-
bool getCalcNearFar() const
- return true if SceneView automatically caclculates near and far clipping planes for each frame
-
void setPrioritizeTextures(bool pt)
- set whether the draw method should call renderer->prioritizeTexture
-
bool getPrioritizeTextures() const
- get whether the draw method should call renderer->prioritizeTexture
-
bool projectWindowIntoObject(const osg::Vec3& window, osg::Vec3& object) const
- Calculate, via glUnProject, the object coordinates of a window point.
-
bool projectWindowXYIntoObject(int x, int y, osg::Vec3& near_point, osg::Vec3& far_point) const
- Calculate, via glUnProject, the object coordinates of a window x,y when projected onto the near and far planes.
-
bool projectObjectIntoWindow(const osg::Vec3& object, osg::Vec3& window) const
- Calculate, via glProject, the object coordinates of a window.
-
inline void setFrameStamp(osg::FrameStamp* fs)
- Set the frame stamp for the current frame
-
inline const osg::FrameStamp* getFrameStamp() const
- Set the frame stamp for the current frame
-
virtual void app()
- do app traversal of attached scene graph using App NodeVisitor
-
virtual void cull()
- do cull traversal of attached scene graph using App CullVisitor
-
virtual void draw()
- do draw traversal of draw bins generated by cull traversal
Public Members
-
enum LightingMode
Protected Fields
-
osg::ref_ptr<osg::Node> _sceneData
-
osg::ref_ptr<osg::StateSet> _globalState
-
osg::ref_ptr<osg::Light> _light
-
osg::ref_ptr<osg::Camera> _camera
-
osg::ref_ptr<osg::State> _state
-
osg::ref_ptr<osg::NodeVisitor> _appVisitor
-
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor
-
osg::ref_ptr<osgUtil::RenderGraph> _rendergraph
-
osg::ref_ptr<osgUtil::RenderStage> _renderStage
-
osg::ref_ptr<osg::FrameStamp> _frameStamp
-
bool _need_compile
-
bool _calc_nearfar
-
osg::Vec4 _backgroundColor
-
double _near_plane
-
double _far_plane
-
float _lodBias
-
osg::ref_ptr<osg::Viewport> _viewport
-
LightingMode _lightingMode
-
bool _prioritizeTextures
Protected Methods
-
virtual ~SceneView()
Documentation
SceneView is literaly a view of a scene, encapsulating the
camera, global state, lights and the scene itself. Provides
methods for setting up the view and rendering it.
- SceneView()
- Constrcut a default scene view
- void setDefaults()
- Set scene view to use default global state, light, camera
and render visitor
- void setSceneData(osg::Node* node)
- Set the data which to view. The data will typically be
an osg::Scene but can be any osg::Node type.
- osg::Node* getSceneData()
- Get the scene data which to view. The data will typically be
an osg::Scene but can be any osg::Node type.
- const osg::Node* getSceneData() const
- Get the const scene data which to view. The data will typically be
an osg::Scene but can be any osg::Node type.
- void setViewport(osg::Viewport* viewport)
- Set the viewport of the scene view to use specfied osg::Viewport.
- void setViewport(int x, int y, int width, int height)
- Set the viewport of the scene view to specified dimensions.
- const osg::Viewport* getViewport() const
- Get the const viewport.
- osg::Viewport* getViewport()
- Get the viewport.
- void getViewport(int& x, int& y, int& width, int& height)
- Get the viewport of the scene view.
- void setBackgroundColor(const osg::Vec4& color)
- Set the background color used in glClearColor().
Defaults to an off blue color.
- const osg::Vec4& getBackgroundColor() const
- Get the background color
- void setGlobalState(osg::StateSet* state)
- osg::StateSet* getGlobalState()
- const osg::StateSet* getGlobalState() const
- enum LightingMode
- HEADLIGHT
- SKY_LIGHT
- NO_SCENEVIEW_LIGHT
- void setLightingMode(LightingMode mode)
- LightingMode getLightingMode() const
- void setLight(osg::Light* light)
- osg::Light* getLight()
- const osg::Light* getLight() const
- void setCamera(osg::Camera* camera)
- osg::Camera* getCamera()
- const osg::Camera* getCamera() const
- void setState(osg::State* state)
- osg::State* getState()
- const osg::State* getState() const
- void setAppVisitor(osg::NodeVisitor* av)
- osg::NodeVisitor* getAppVisitor()
- const osg::NodeVisitor* getAppVisitor() const
- void setCullVisitor(osgUtil::CullVisitor* cv)
- osgUtil::CullVisitor* getCullVisitor()
- const osgUtil::CullVisitor* getCullVisitor() const
- void setRenderGraph(osgUtil::RenderGraph* rg)
- osgUtil::RenderGraph* getRenderGraph()
- const osgUtil::RenderGraph* getRenderGraph() const
- void setRenderStage(osgUtil::RenderStage* rs)
- osgUtil::RenderStage* getRenderStage()
- const osgUtil::RenderStage* getRenderStage() const
- void setLODBias(float bias)
- float getLODBias() const
- void setCalcNearFar(bool calc)
- Set to true if you want SceneView to automatically calculate values
for the near/far clipping planes, each frame, set false to use camera's
internal near and far planes. Default value is true.
- bool getCalcNearFar() const
- return true if SceneView automatically caclculates near and
far clipping planes for each frame
- void setPrioritizeTextures(bool pt)
- set whether the draw method should call renderer->prioritizeTexture
- bool getPrioritizeTextures() const
- get whether the draw method should call renderer->prioritizeTexture
- bool projectWindowIntoObject(const osg::Vec3& window, osg::Vec3& object) const
- Calculate, via glUnProject, the object coordinates of a window point.
Note, current implementation requires that SceneView::draw() has been previously called
for projectWindowIntoObject to produce valid values. Consistent with OpenGL
windows coordinates are calculated relative to the bottom left of the window.
Returns true on successful projection.
- bool projectWindowXYIntoObject(int x, int y, osg::Vec3& near_point, osg::Vec3& far_point) const
- Calculate, via glUnProject, the object coordinates of a window x,y
when projected onto the near and far planes.
Note, current implementation requires that SceneView::draw() has been previously called
for projectWindowIntoObject to produce valid values. Consistent with OpenGL
windows coordinates are calculated relative to the bottom left of the window.
Returns true on successful projection.
- bool projectObjectIntoWindow(const osg::Vec3& object, osg::Vec3& window) const
- Calculate, via glProject, the object coordinates of a window.
Note, current implementation requires that SceneView::draw() has been previously called
for projectWindowIntoObject to produce valid values. Consistent with OpenGL
windows coordinates are calculated relative to the bottom left of the window,
whereas as window API's normally have the top left as the origin,
so you may need to pass in (mouseX,window_height-mouseY,...).
Returns true on successful projection.
- inline void setFrameStamp(osg::FrameStamp* fs)
- Set the frame stamp for the current frame
- inline const osg::FrameStamp* getFrameStamp() const
- Set the frame stamp for the current frame
- virtual void app()
- do app traversal of attached scene graph using App NodeVisitor
- virtual void cull()
- do cull traversal of attached scene graph using App CullVisitor
- virtual void draw()
- do draw traversal of draw bins generated by cull traversal
- virtual ~SceneView()
- osg::ref_ptr<osg::Node> _sceneData
- osg::ref_ptr<osg::StateSet> _globalState
- osg::ref_ptr<osg::Light> _light
- osg::ref_ptr<osg::Camera> _camera
- osg::ref_ptr<osg::State> _state
- osg::ref_ptr<osg::NodeVisitor> _appVisitor
- osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor
- osg::ref_ptr<osgUtil::RenderGraph> _rendergraph
- osg::ref_ptr<osgUtil::RenderStage> _renderStage
- osg::ref_ptr<osg::FrameStamp> _frameStamp
- bool _need_compile
- bool _calc_nearfar
- osg::Vec4 _backgroundColor
- double _near_plane
- double _far_plane
- float _lodBias
- osg::ref_ptr<osg::Viewport> _viewport
- LightingMode _lightingMode
- bool _prioritizeTextures
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.