Public Types |
enum | LightingMode { HEADLIGHT,
SKY_LIGHT,
NO_SCENEVIEW_LIGHT
} |
Public Methods |
| SceneView (osg::DisplaySettings *ds=NULL) |
| Construct 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 | setDisplaySettings (osg::DisplaySettings *vs) |
| Set the DisplaySettings.
|
const osg::DisplaySettings * | getDisplaySettings () const |
| Get the const DisplaySettings.
|
osg::DisplaySettings * | getDisplaySettings () |
| Get the DisplaySettings.
|
void | setBackgroundColor (const osg::Vec4 &color) |
| Set the background color used in glClearColor().
|
const osg::Vec4 & | getBackgroundColor () const |
| Get the background color.
|
void | setGlobalStateSet (osg::StateSet *state) |
osg::StateSet * | getGlobalStateSet () |
const osg::StateSet * | getGlobalStateSet () const |
void | setLightingMode (LightingMode mode) |
LightingMode | getLightingMode () const |
void | setLight (osg::Light *light) |
osg::Light * | getLight () |
const osg::Light * | getLight () const |
void | setState (osg::State *state) |
osg::State * | getState () |
const osg::State * | getState () const |
void | setCamera (osg::Camera *camera) |
| set an osg::Camera for the scene view to use for setting projection and modelview matrices internaly.
|
osg::Camera * | getCamera () |
const osg::Camera * | getCamera () const |
void | setProjectionMatrix (osg::Matrix *matrix) |
| set a projection matrix.
|
osg::Matrix * | getProjectionMatrix () |
const osg::Matrix * | getProjectionMatrix () const |
void | setModelViewMatrix (osg::Matrix *matrix) |
| set a modelview matrix.
|
osg::Matrix * | getModelViewMatrix () |
const osg::Matrix * | getModelViewMatrix () const |
void | setInitVisitor (osg::NodeVisitor *av) |
osg::NodeVisitor * | getInitVisitor () |
const osg::NodeVisitor * | getInitVisitor () 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 | setCullMask (const osg::Node::NodeMask nm) |
const osg::Node::NodeMask | getCullMask () const |
void | setCullMaskLeft (const osg::Node::NodeMask nm) |
const osg::Node::NodeMask | getCullMaskLeft () const |
void | setCullMaskRight (const osg::Node::NodeMask nm) |
const osg::Node::NodeMask | getCullMaskRight () const |
void | setLODBias (float bias) |
| Set the LOD bias for the CullVisitor to use.
|
float | getLODBias () const |
| Get the LOD bias.
|
void | setSmallFeatureCullingPixelSize (float value) |
| Set the Small Feature Culling Pixel Size.
|
float | getSmallFeatureCullingPixelSize () const |
| Get the Small Feature Culling Pixel Size.
|
void | setCullingMode (osg::CullStack::CullingMode mode) |
| Set the culling mode for the CullVisitor to use.
|
osg::CullStack::CullingMode | getCullingMode () const |
| Returns the current CullingMode.
|
void | setComputeNearFarMode (CullVisitor::ComputeNearFarMode cnfm) |
| Set the ComputeNearFarMode for the CullVisitor to use.
|
CullVisitor::ComputeNearFarMode | getComputeNearFarMode () const |
| Get the ComputeNearFarMode.
|
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.
|
void | setFrameStamp (osg::FrameStamp *fs) |
| Set the frame stamp for the current frame.
|
const osg::FrameStamp * | getFrameStamp () const |
| Set the frame stamp for the current frame.
|
virtual void | init () |
| Do init traversal of attached scene graph using Init NodeVisitor.
|
virtual void | app () |
| Do app traversal of attached scene graph using App NodeVisitor.
|
virtual void | cull () |
| Do cull traversal of attached scene graph using Cull NodeVisitor.
|
virtual void | draw () |
| Do draw traversal of draw bins generated by cull traversal.
|
Protected Methods |
virtual | ~SceneView () |
virtual void | cullStage (osg::Matrix *projection, osg::Matrix *modelview, osgUtil::CullVisitor *cullVisitor, osgUtil::RenderGraph *rendergraph, osgUtil::RenderStage *renderStage) |
| Do cull traversal of attached scene graph using Cull NodeVisitor.
|
virtual void | drawStage (osgUtil::RenderStage *renderStage) |
const osg::Matrix | computeMVPW () const |
void | clearArea (int x, int y, int width, int height, const osg::Vec4 &color) |
Protected Attributes |
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::Matrix > | _projectionMatrix |
osg::ref_ptr< osg::Matrix > | _modelviewMatrix |
osg::ref_ptr< osg::DisplaySettings > | _displaySettings |
osg::ref_ptr< osg::State > | _state |
bool | _initCalled |
osg::ref_ptr< osg::NodeVisitor > | _initVisitor |
osg::ref_ptr< osg::NodeVisitor > | _appVisitor |
osg::Node::NodeMask | _cullMask |
osg::ref_ptr< osgUtil::CullVisitor > | _cullVisitor |
osg::ref_ptr< osgUtil::RenderGraph > | _rendergraph |
osg::ref_ptr< osgUtil::RenderStage > | _renderStage |
osg::Node::NodeMask | _cullMaskLeft |
osg::ref_ptr< osgUtil::CullVisitor > | _cullVisitorLeft |
osg::ref_ptr< osgUtil::RenderGraph > | _rendergraphLeft |
osg::ref_ptr< osgUtil::RenderStage > | _renderStageLeft |
osg::Node::NodeMask | _cullMaskRight |
osg::ref_ptr< osgUtil::CullVisitor > | _cullVisitorRight |
osg::ref_ptr< osgUtil::RenderGraph > | _rendergraphRight |
osg::ref_ptr< osgUtil::RenderStage > | _renderStageRight |
osg::ref_ptr< osg::FrameStamp > | _frameStamp |
osg::Vec4 | _backgroundColor |
CullVisitor::ComputeNearFarMode | _computeNearFar |
osg::CullStack::CullingMode | _cullingMode |
float | _LODBias |
float | _smallFeatureCullingPixelSize |
osg::ref_ptr< osg::Viewport > | _viewport |
LightingMode | _lightingMode |
bool | _prioritizeTextures |
Provides methods for setting up the view and rendering it.