Equalizer
1.4.1
|
Based on osgUtil::SceneView, but stripped done to only render and not interfere with stereo setup. More...
#include <sceneView.h>
Public Member Functions | |
SceneView (osg::DisplaySettings *ds=NULL) | |
Construct a default scene view. | |
SceneView (const SceneView &sceneview, const osg::CopyOp ©op=osg::CopyOp()) | |
META_Object (osgUtil, SceneView) | |
virtual void | setDefaults () |
virtual void | setDefaults (unsigned int options) |
Set scene view to use default global state, light, camera and render visitor. | |
void | setCamera (osg::Camera *camera, bool assumeOwnershipOfCamera=true) |
Set the camera used to represent the camera view of this SceneView. | |
osg::Camera * | getCamera () |
Get the camera used to represent the camera view of this SceneView. | |
const osg::Camera * | getCamera () const |
Get the const camera used to represent the camera view of this SceneView. | |
void | setSceneData (osg::Node *node) |
Set the data to view. | |
osg::Node * | getSceneData (unsigned int childNo=0) |
Get the scene data to view. | |
const osg::Node * | getSceneData (unsigned int childNo=0) const |
Get the const scene data which to view. | |
unsigned int | getNumSceneData () const |
Get the number of scene data subgraphs added to the SceneView's camera. | |
void | setViewport (osg::Viewport *viewport) |
Set the viewport of the scene view to use specified osg::Viewport. | |
void | setViewport (int x, int y, int width, int height) |
Set the viewport of the scene view to specified dimensions. | |
osg::Viewport * | getViewport () |
Get the viewport. | |
const osg::Viewport * | getViewport () const |
Get the const viewport. | |
void | setDisplaySettings (osg::DisplaySettings *vs) |
Set the DisplaySettings. | |
const osg::DisplaySettings * | getDisplaySettings () const |
Get the const DisplaySettings. | |
osg::DisplaySettings * | getDisplaySettings () |
Get the DisplaySettings. | |
void | setClearColor (const osg::Vec4 &color) |
Set the color used in glClearColor(). | |
const osg::Vec4 & | getClearColor () const |
Get the color used in glClearColor. | |
void | setGlobalStateSet (osg::StateSet *state) |
osg::StateSet * | getGlobalStateSet () |
const osg::StateSet * | getGlobalStateSet () const |
void | setSecondaryStateSet (osg::StateSet *state) |
osg::StateSet * | getSecondaryStateSet () |
const osg::StateSet * | getSecondaryStateSet () const |
void | setLocalStateSet (osg::StateSet *state) |
osg::StateSet * | getLocalStateSet () |
const osg::StateSet * | getLocalStateSet () const |
void | setActiveUniforms (int activeUniforms) |
Set the uniforms that SceneView should set set up on each frame. | |
int | getActiveUniforms () const |
Get the uniforms that SceneView should set set up on each frame. | |
void | updateUniforms () |
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 | setView (osg::View *view) |
osg::View * | getView () |
const osg::View * | getView () const |
void | setRenderInfo (osg::RenderInfo &renderInfo) |
osg::RenderInfo & | getRenderInfo () |
const osg::RenderInfo & | getRenderInfo () const |
void | setProjectionMatrix (const osg::Matrixf &matrix) |
Set the projection matrix. | |
void | setProjectionMatrix (const osg::Matrixd &matrix) |
Set the projection matrix. | |
void | setProjectionMatrixAsOrtho (double left, double right, double bottom, double top, double zNear, double zFar) |
Set to an orthographic projection. | |
void | setProjectionMatrixAsOrtho2D (double left, double right, double bottom, double top) |
Set to a 2D orthographic projection. | |
void | setProjectionMatrixAsFrustum (double left, double right, double bottom, double top, double zNear, double zFar) |
Set to a perspective projection. | |
void | setProjectionMatrixAsPerspective (double fovy, double aspectRatio, double zNear, double zFar) |
Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details. | |
osg::Matrixd & | getProjectionMatrix () |
Get the projection matrix. | |
const osg::Matrixd & | getProjectionMatrix () const |
Get the const projection matrix. | |
bool | getProjectionMatrixAsOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
Get the orthographic settings of the orthographic projection matrix. | |
bool | getProjectionMatrixAsFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
Get the frustum setting of a perspective projection matrix. | |
bool | getProjectionMatrixAsPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const |
Get the frustum setting of a symmetric perspective projection matrix. | |
void | setViewMatrix (const osg::Matrixf &matrix) |
Set the view matrix. | |
void | setViewMatrix (const osg::Matrixd &matrix) |
Set the view matrix. | |
void | setViewMatrixAsLookAt (const osg::Vec3 &eye, const osg::Vec3 ¢er, const osg::Vec3 &up) |
Set to the position and orientation of view matrix, using the same convention as gluLookAt. | |
osg::Matrixd & | getViewMatrix () |
Get the view matrix. | |
const osg::Matrixd & | getViewMatrix () const |
Get the const view matrix. | |
void | getViewMatrixAsLookAt (osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up, float lookDistance=1.0f) const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. | |
void | setInitVisitor (osg::NodeVisitor *av) |
osg::NodeVisitor * | getInitVisitor () |
const osg::NodeVisitor * | getInitVisitor () const |
void | setUpdateVisitor (osg::NodeVisitor *av) |
osg::NodeVisitor * | getUpdateVisitor () |
const osg::NodeVisitor * | getUpdateVisitor () const |
void | setCullVisitor (osgUtil::CullVisitor *cv) |
osgUtil::CullVisitor * | getCullVisitor () |
const osgUtil::CullVisitor * | getCullVisitor () const |
void | setCollectOccludersVisitor (osg::CollectOccludersVisitor *cov) |
osg::CollectOccludersVisitor * | getCollectOccludersVisitor () |
const osg::CollectOccludersVisitor * | getCollectOccludersVisitor () const |
void | setStateGraph (osgUtil::StateGraph *rg) |
osgUtil::StateGraph * | getStateGraph () |
const osgUtil::StateGraph * | getStateGraph () const |
void | setRenderStage (osgUtil::RenderStage *rs) |
osgUtil::RenderStage * | getRenderStage () |
const osgUtil::RenderStage * | getRenderStage () const |
void | collateReferencesToDependentCameras () |
search through any pre and post RenderStage that reference a Camera, and take a reference to each of these cameras to prevent them being deleted while they are still be used by the drawing thread. | |
void | clearReferencesToDependentCameras () |
clear the refence to any any dependent cameras. | |
void | setDrawBufferValue (GLenum drawBufferValue) |
Set the draw buffer value used at the start of each frame draw. | |
GLenum | getDrawBufferValue () const |
Get the draw buffer value used at the start of each frame draw. | |
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 the object coordinates of a point in window coordinates. | |
bool | projectWindowXYIntoObject (int x, int y, osg::Vec3 &near_point, osg::Vec3 &far_point) const |
Calculate 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 the window coordinates of a point in object coordinates. | |
void | setFrameStamp (osg::FrameStamp *fs) |
Set the frame stamp for the current frame. | |
const osg::FrameStamp * | getFrameStamp () const |
Get the frame stamp for the current frame. | |
virtual void | inheritCullSettings (const osg::CullSettings &settings) |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask. | |
virtual void | inheritCullSettings (const osg::CullSettings &settings, unsigned int inheritanceMask) |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask. | |
virtual void | init () |
Do init traversal of attached scene graph using Init 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. | |
unsigned int | getDynamicObjectCount () const |
Compute the number of dynamic objects that will be held in the rendering backend. | |
virtual void | releaseAllGLObjects () |
Release all OpenGL objects from the scene graph, such as texture objects, display lists etc. | |
virtual void | flushAllDeletedGLObjects () |
Flush all deleted OpenGL objects, such as texture objects, display lists etc. | |
virtual void | flushDeletedGLObjects (double &availableTime) |
Flush deleted OpenGL objects, such as texture objects, display lists etc within specified available time. | |
bool | getStats (osgUtil::Statistics &primStats) |
Extract stats for current draw list. | |
Public Types | |
enum | Options { NO_SCENEVIEW_LIGHT = 0x0, HEADLIGHT = 0x1, SKY_LIGHT = 0x2, COMPILE_GLOBJECTS_AT_INIT = 0x4, STANDARD_SETTINGS } |
enum | ActiveUniforms { FRAME_NUMBER_UNIFORM = 1, FRAME_TIME_UNIFORM = 2, DELTA_FRAME_TIME_UNIFORM = 4, SIMULATION_TIME_UNIFORM = 8, DELTA_SIMULATION_TIME_UNIFORM = 16, VIEW_MATRIX_UNIFORM = 32, VIEW_MATRIX_INVERSE_UNIFORM = 64, DEFAULT_UNIFORMS, ALL_UNIFORMS = 0x7FFFFFFF } |
typedef Options | LightingMode |
Protected Member Functions | |
virtual bool | cullStage (const osg::Matrixd &projection, const osg::Matrixd &modelview, osgUtil::CullVisitor *cullVisitor, osgUtil::StateGraph *rendergraph, osgUtil::RenderStage *renderStage, osg::Viewport *viewport) |
Do cull traversal of attached scene graph using Cull NodeVisitor. | |
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::StateSet > | _localStateSet |
osg::RenderInfo | _renderInfo |
bool | _initCalled |
osg::ref_ptr< osg::NodeVisitor > | _initVisitor |
osg::ref_ptr< osg::NodeVisitor > | _updateVisitor |
osg::ref_ptr < osgUtil::CullVisitor > | _cullVisitor |
osg::ref_ptr< osgUtil::StateGraph > | _stateGraph |
osg::ref_ptr < osgUtil::RenderStage > | _renderStage |
osg::ref_ptr < osg::CollectOccludersVisitor > | _collectOccludersVisitor |
osg::ref_ptr< osg::FrameStamp > | _frameStamp |
osg::observer_ptr< osg::Camera > | _camera |
osg::ref_ptr< osg::Camera > | _cameraWithOwnership |
osg::ref_ptr< osg::StateSet > | _globalStateSet |
osg::ref_ptr< osg::Light > | _light |
osg::ref_ptr < osg::DisplaySettings > | _displaySettings |
osg::ref_ptr< osg::StateSet > | _secondaryStateSet |
float | _fusionDistanceValue |
LightingMode | _lightingMode |
bool | _prioritizeTextures |
bool | _requiresFlush |
int | _activeUniforms |
double | _previousFrameTime |
double | _previousSimulationTime |
unsigned int | _dynamicObjectCount |
Based on osgUtil::SceneView, but stripped done to only render and not interfere with stereo setup.
SceneView is deprecated, and is now just kept for backwards compatibility. It is recommend that you use osgViewer::Viewer/Composite in combination with osgViewer::GraphicsWindowEmbedded for embedded rendering support as this provides a greater range of functionality and consistency of API.
Definition at line 41 of file sceneView.h.
osgScaleViewer::SceneView::SceneView | ( | osg::DisplaySettings * | ds = NULL | ) |
Construct a default scene view.
Definition at line 42 of file sceneView.cpp.
clear the refence to any any dependent cameras.
Definition at line 821 of file sceneView.cpp.
search through any pre and post RenderStage that reference a Camera, and take a reference to each of these cameras to prevent them being deleted while they are still be used by the drawing thread.
Definition at line 816 of file sceneView.cpp.
void osgScaleViewer::SceneView::cull | ( | ) | [virtual] |
Do cull traversal of attached scene graph using Cull NodeVisitor.
Definition at line 367 of file sceneView.cpp.
References cullStage(), getProjectionMatrix(), getViewMatrix(), and getViewport().
bool osgScaleViewer::SceneView::cullStage | ( | const osg::Matrixd & | projection, |
const osg::Matrixd & | modelview, | ||
osgUtil::CullVisitor * | cullVisitor, | ||
osgUtil::StateGraph * | rendergraph, | ||
osgUtil::RenderStage * | renderStage, | ||
osg::Viewport * | viewport | ||
) | [protected, virtual] |
Do cull traversal of attached scene graph using Cull NodeVisitor.
Return true if computeNearFar has been done during the cull traversal.
Definition at line 428 of file sceneView.cpp.
References getSceneData().
Referenced by cull().
void osgScaleViewer::SceneView::draw | ( | ) | [virtual] |
Do draw traversal of draw bins generated by cull traversal.
Definition at line 607 of file sceneView.cpp.
References flushDeletedGLObjects(), getViewMatrix(), getViewport(), and init().
void osgScaleViewer::SceneView::flushAllDeletedGLObjects | ( | ) | [virtual] |
Flush all deleted OpenGL objects, such as texture objects, display lists etc.
Definition at line 589 of file sceneView.cpp.
void osgScaleViewer::SceneView::flushDeletedGLObjects | ( | double & | availableTime | ) | [virtual] |
Flush deleted OpenGL objects, such as texture objects, display lists etc within specified available time.
Definition at line 596 of file sceneView.cpp.
Referenced by draw().
int osgScaleViewer::SceneView::getActiveUniforms | ( | ) | const [inline] |
Get the uniforms that SceneView should set set up on each frame.
Definition at line 162 of file sceneView.h.
osg::Camera* osgScaleViewer::SceneView::getCamera | ( | ) | [inline] |
Get the camera used to represent the camera view of this SceneView.
Definition at line 74 of file sceneView.h.
const osg::Camera* osgScaleViewer::SceneView::getCamera | ( | ) | const [inline] |
Get the const camera used to represent the camera view of this SceneView.
Definition at line 77 of file sceneView.h.
const osg::Vec4& osgScaleViewer::SceneView::getClearColor | ( | ) | const [inline] |
Get the color used in glClearColor.
Definition at line 125 of file sceneView.h.
GLenum osgScaleViewer::SceneView::getDrawBufferValue | ( | ) | const [inline] |
Get the draw buffer value used at the start of each frame draw.
Definition at line 301 of file sceneView.h.
const osg::FrameStamp* osgScaleViewer::SceneView::getFrameStamp | ( | ) | const [inline] |
Get the frame stamp for the current frame.
Definition at line 341 of file sceneView.h.
unsigned int osgScaleViewer::SceneView::getNumSceneData | ( | ) | const [inline] |
Get the number of scene data subgraphs added to the SceneView's camera.
Definition at line 95 of file sceneView.h.
bool osgScaleViewer::SceneView::getPrioritizeTextures | ( | ) | const [inline] |
Get whether the draw method should call renderer->prioritizeTexture.
Definition at line 308 of file sceneView.h.
osg::Matrixd& osgScaleViewer::SceneView::getProjectionMatrix | ( | ) | [inline] |
Get the projection matrix.
Definition at line 216 of file sceneView.h.
Referenced by cull(), getProjectionMatrixAsFrustum(), getProjectionMatrixAsOrtho(), and getProjectionMatrixAsPerspective().
const osg::Matrixd& osgScaleViewer::SceneView::getProjectionMatrix | ( | ) | const [inline] |
Get the const projection matrix.
Definition at line 219 of file sceneView.h.
bool osgScaleViewer::SceneView::getProjectionMatrixAsFrustum | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the frustum setting of a perspective projection matrix.
Returns false if matrix is not a perspective matrix, where parameter values are undefined.
Definition at line 786 of file sceneView.cpp.
References getProjectionMatrix().
bool osgScaleViewer::SceneView::getProjectionMatrixAsOrtho | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the orthographic settings of the orthographic projection matrix.
Returns false if matrix is not an orthographic matrix, where parameter values are undefined.
Definition at line 777 of file sceneView.cpp.
References getProjectionMatrix().
bool osgScaleViewer::SceneView::getProjectionMatrixAsPerspective | ( | double & | fovy, |
double & | aspectRatio, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the frustum setting of a symmetric perspective projection matrix.
Returns false if matrix is not a perspective matrix, where parameter values are undefined. Note, if matrix is not a symmetric perspective matrix then the shear will be lost. Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.
Definition at line 795 of file sceneView.cpp.
References getProjectionMatrix().
osg::Node* osgScaleViewer::SceneView::getSceneData | ( | unsigned int | childNo = 0 | ) | [inline] |
Get the scene data to view.
The data will typically be an osg::Scene but can be any osg::Node type.
Definition at line 87 of file sceneView.h.
Referenced by cullStage().
const osg::Node* osgScaleViewer::SceneView::getSceneData | ( | unsigned int | childNo = 0 | ) | const [inline] |
Get the const scene data which to view.
The data will typically be an osg::Scene but can be any osg::Node type.
Definition at line 92 of file sceneView.h.
bool osgScaleViewer::SceneView::getStats | ( | osgUtil::Statistics & | primStats | ) |
Extract stats for current draw list.
Definition at line 811 of file sceneView.cpp.
osg::Matrixd& osgScaleViewer::SceneView::getViewMatrix | ( | ) | [inline] |
Get the view matrix.
Definition at line 252 of file sceneView.h.
Referenced by cull(), draw(), and getViewMatrixAsLookAt().
const osg::Matrixd& osgScaleViewer::SceneView::getViewMatrix | ( | ) | const [inline] |
Get the const view matrix.
Definition at line 255 of file sceneView.h.
void osgScaleViewer::SceneView::getViewMatrixAsLookAt | ( | osg::Vec3 & | eye, |
osg::Vec3 & | center, | ||
osg::Vec3 & | up, | ||
float | lookDistance = 1.0f |
||
) | const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
Definition at line 806 of file sceneView.cpp.
References getViewMatrix().
osg::Viewport* osgScaleViewer::SceneView::getViewport | ( | ) | [inline] |
Get the viewport.
Definition at line 105 of file sceneView.h.
Referenced by cull(), and draw().
const osg::Viewport* osgScaleViewer::SceneView::getViewport | ( | ) | const [inline] |
Get the const viewport.
Definition at line 108 of file sceneView.h.
virtual void osgScaleViewer::SceneView::inheritCullSettings | ( | const osg::CullSettings & | settings | ) | [inline, virtual] |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.
Definition at line 345 of file sceneView.h.
References inheritCullSettings().
Referenced by inheritCullSettings().
void osgScaleViewer::SceneView::inheritCullSettings | ( | const osg::CullSettings & | settings, |
unsigned int | inheritanceMask | ||
) | [virtual] |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.
Definition at line 336 of file sceneView.cpp.
References inheritCullSettings().
void osgScaleViewer::SceneView::init | ( | ) | [virtual] |
Do init traversal of attached scene graph using Init NodeVisitor.
The init traversal is called once for each SceneView, and should be used to compile display list, texture objects intialize data not otherwise intialized during scene graph loading. Note, is called automatically by update & cull if it hasn't already been called elsewhere. Also init() should only ever be called within a valid graphics context.
Definition at line 215 of file sceneView.cpp.
Referenced by draw().
bool osgScaleViewer::SceneView::projectObjectIntoWindow | ( | const osg::Vec3 & | object, |
osg::Vec3 & | window | ||
) | const |
Calculate the window coordinates of a point in object coordinates.
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 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.
Note, current implementation requires that SceneView::draw() has been previously called for projectWindowIntoObject to produce valid values. As per OpenGL windows coordinates are calculated relative to the bottom left of the window.
Definition at line 713 of file sceneView.cpp.
bool osgScaleViewer::SceneView::projectWindowIntoObject | ( | const osg::Vec3 & | window, |
osg::Vec3 & | object | ||
) | const |
Calculate the object coordinates of a point in window coordinates.
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.
Note, current implementation requires that SceneView::draw() has been previously called for projectWindowIntoObject to produce valid values. As per OpenGL windows coordinates are calculated relative to the bottom left of the window.
Definition at line 681 of file sceneView.cpp.
bool osgScaleViewer::SceneView::projectWindowXYIntoObject | ( | int | x, |
int | y, | ||
osg::Vec3 & | near_point, | ||
osg::Vec3 & | far_point | ||
) | const |
Calculate the object coordinates of a window x,y when projected onto the near and far planes.
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.
Note, current implementation requires that SceneView::draw() has been previously called for projectWindowIntoObject to produce valid values. As per OpenGL windows coordinates are calculated relative to the bottom left of the window.
Definition at line 697 of file sceneView.cpp.
void osgScaleViewer::SceneView::releaseAllGLObjects | ( | ) | [virtual] |
Release all OpenGL objects from the scene graph, such as texture objects, display lists etc.
These released scene graphs placed in the respective delete GLObjects cache, which then need to be deleted in OpenGL by SceneView::flushAllDeleteGLObjects().
Definition at line 578 of file sceneView.cpp.
void osgScaleViewer::SceneView::setActiveUniforms | ( | int | activeUniforms | ) | [inline] |
Set the uniforms that SceneView should set set up on each frame.
Definition at line 159 of file sceneView.h.
void osgScaleViewer::SceneView::setCamera | ( | osg::Camera * | camera, |
bool | assumeOwnershipOfCamera = true |
||
) |
Set the camera used to represent the camera view of this SceneView.
Definition at line 181 of file sceneView.cpp.
void osgScaleViewer::SceneView::setClearColor | ( | const osg::Vec4 & | color | ) | [inline] |
Set the color used in glClearColor().
Defaults to an off blue color.
Definition at line 122 of file sceneView.h.
void osgScaleViewer::SceneView::setDisplaySettings | ( | osg::DisplaySettings * | vs | ) | [inline] |
Set the DisplaySettings.
Definition at line 111 of file sceneView.h.
void osgScaleViewer::SceneView::setDrawBufferValue | ( | GLenum | drawBufferValue | ) | [inline] |
Set the draw buffer value used at the start of each frame draw.
Definition at line 298 of file sceneView.h.
void osgScaleViewer::SceneView::setFrameStamp | ( | osg::FrameStamp * | fs | ) | [inline] |
Set the frame stamp for the current frame.
Definition at line 338 of file sceneView.h.
void osgScaleViewer::SceneView::setPrioritizeTextures | ( | bool | pt | ) | [inline] |
Set whether the draw method should call renderer->prioritizeTexture.
Definition at line 305 of file sceneView.h.
void osgScaleViewer::SceneView::setProjectionMatrix | ( | const osg::Matrixf & | matrix | ) | [inline] |
Set the projection matrix.
Can be thought of as setting the lens of a camera.
Definition at line 191 of file sceneView.h.
Referenced by setProjectionMatrixAsFrustum(), setProjectionMatrixAsOrtho(), setProjectionMatrixAsOrtho2D(), and setProjectionMatrixAsPerspective().
void osgScaleViewer::SceneView::setProjectionMatrix | ( | const osg::Matrixd & | matrix | ) | [inline] |
Set the projection matrix.
Can be thought of as setting the lens of a camera.
Definition at line 194 of file sceneView.h.
void osgScaleViewer::SceneView::setProjectionMatrixAsFrustum | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top, | ||
double | zNear, | ||
double | zFar | ||
) |
Set to a perspective projection.
See OpenGL glFrustum documentation for further details.
Definition at line 761 of file sceneView.cpp.
References setProjectionMatrix().
void osgScaleViewer::SceneView::setProjectionMatrixAsOrtho | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top, | ||
double | zNear, | ||
double | zFar | ||
) |
Set to an orthographic projection.
See OpenGL glOrtho for documentation further details.
Definition at line 745 of file sceneView.cpp.
References setProjectionMatrix().
void osgScaleViewer::SceneView::setProjectionMatrixAsOrtho2D | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top | ||
) |
Set to a 2D orthographic projection.
See OpenGL glOrtho2D documentation for further details.
Definition at line 754 of file sceneView.cpp.
References setProjectionMatrix().
void osgScaleViewer::SceneView::setProjectionMatrixAsPerspective | ( | double | fovy, |
double | aspectRatio, | ||
double | zNear, | ||
double | zFar | ||
) |
Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details.
Aspect ratio is defined as width/height.
Definition at line 770 of file sceneView.cpp.
References setProjectionMatrix().
void osgScaleViewer::SceneView::setSceneData | ( | osg::Node * | node | ) |
Set the data to view.
The data will typically be an osg::Scene but can be any osg::Node type.
Definition at line 202 of file sceneView.cpp.
void osgScaleViewer::SceneView::setViewMatrix | ( | const osg::Matrixf & | matrix | ) | [inline] |
Set the view matrix.
Can be thought of as setting the position of the world relative to the camera in camera coordinates.
Definition at line 243 of file sceneView.h.
Referenced by setViewMatrixAsLookAt().
void osgScaleViewer::SceneView::setViewMatrix | ( | const osg::Matrixd & | matrix | ) | [inline] |
Set the view matrix.
Can be thought of as setting the position of the world relative to the camera in camera coordinates.
Definition at line 246 of file sceneView.h.
void osgScaleViewer::SceneView::setViewMatrixAsLookAt | ( | const osg::Vec3 & | eye, |
const osg::Vec3 & | center, | ||
const osg::Vec3 & | up | ||
) |
Set to the position and orientation of view matrix, using the same convention as gluLookAt.
Definition at line 801 of file sceneView.cpp.
References setViewMatrix().
void osgScaleViewer::SceneView::setViewport | ( | osg::Viewport * | viewport | ) | [inline] |
Set the viewport of the scene view to use specified osg::Viewport.
Definition at line 98 of file sceneView.h.
void osgScaleViewer::SceneView::setViewport | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) | [inline] |
Set the viewport of the scene view to specified dimensions.
Definition at line 101 of file sceneView.h.