SceneView
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGUTIL_SCENEVIEW
#define OSGUTIL_SCENEVIEW 1
#include <osg/Node>
#include <osg/StateSet>
#include <osg/Light>
#include <osg/FrameStamp>
#include <osg/DisplaySettings>
#include <osg/CollectOccludersVisitor>
#include <osg/CullSettings>
#include <osg/Camera>
#include <osgUtil/CullVisitor>
namespace osgUtil {
class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
{
public:
SceneView(osg::DisplaySettings* ds=NULL);
SceneView(const SceneView& sceneview, const osg::CopyOp& copyop = osg::CopyOp());
META_Object(osgUtil, SceneView);
enum Options
{
NO_SCENEVIEW_LIGHT = 0x0,
HEADLIGHT = 0x1,
SKY_LIGHT = 0x2,
COMPILE_GLOBJECTS_AT_INIT = 0x4,
APPLY_GLOBAL_DEFAULTS = 0x8,
CLEAR_GLOBAL_STATESET = 0x10,
STANDARD_SETTINGS = HEADLIGHT |
COMPILE_GLOBJECTS_AT_INIT |
APPLY_GLOBAL_DEFAULTS |
CLEAR_GLOBAL_STATESET
};
/* Set defaults. */
virtual void setDefaults() { setDefaults(STANDARD_SETTINGS); }
virtual void setDefaults(unsigned int options);
void setCamera(osg::Camera* camera, bool assumeOwnershipOfCamera = true);
osg::Camera* getCamera() { return _camera.get(); }
const osg::Camera* getCamera() const { return _camera.get(); }
void setSceneData(osg::Node* node);
osg::Node* getSceneData(unsigned int childNo=0) { return (_camera->getNumChildren()>childNo) ? _camera->getChild(childNo) : 0; }
const osg::Node* getSceneData(unsigned int childNo=0) const { return (_camera->getNumChildren()>childNo) ? _camera->getChild(childNo) : 0; }
unsigned int getNumSceneData() const { return _camera->getNumChildren(); }
void setViewport(osg::Viewport* viewport) { _camera->setViewport(viewport); }
void setViewport(int x,int y,int width,int height) { _camera->setViewport(x,y,width,height); }
osg::Viewport* getViewport() { return (_camera->getViewport()!=0) ? _camera->getViewport() : 0; }
const osg::Viewport* getViewport() const { return (_camera->getViewport()!=0) ? _camera->getViewport() : 0; }
inline void setDisplaySettings(osg::DisplaySettings* vs) { _displaySettings = vs; }
inline const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); }
inline osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); }
void setClearColor(const osg::Vec4& color) { _camera->setClearColor(color); }
const osg::Vec4& getClearColor() const { return _camera->getClearColor(); }
void setRedrawInterlacedStereoStencilMask(bool flag) { _redrawInterlacedStereoStencilMask = flag; }
bool getRedrawInterlacedStereoStencilMask() const { return _redrawInterlacedStereoStencilMask; }
void setGlobalStateSet(osg::StateSet* state) { _globalStateSet = state; }
osg::StateSet* getGlobalStateSet() { return _globalStateSet.get(); }
const osg::StateSet* getGlobalStateSet() const { return _globalStateSet.get(); }
void setSecondaryStateSet(osg::StateSet* state) { _secondaryStateSet = state; }
osg::StateSet* getSecondaryStateSet() { return _secondaryStateSet.get(); }
const osg::StateSet* getSecondaryStateSet() const { return _secondaryStateSet.get(); }
void setLocalStateSet(osg::StateSet* state) { _localStateSet = state; }
osg::StateSet* getLocalStateSet() { return _localStateSet.get(); }
const osg::StateSet* getLocalStateSet() const { return _localStateSet.get(); }
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 = FRAME_NUMBER_UNIFORM |
FRAME_TIME_UNIFORM |
DELTA_FRAME_TIME_UNIFORM |
SIMULATION_TIME_UNIFORM |
DELTA_SIMULATION_TIME_UNIFORM |
VIEW_MATRIX_UNIFORM |
VIEW_MATRIX_INVERSE_UNIFORM,
ALL_UNIFORMS = 0x7FFFFFFF
};
void setActiveUniforms(int activeUniforms) { _activeUniforms = activeUniforms; }
int getActiveUniforms() const { return _activeUniforms; }
void updateUniforms();
typedef Options LightingMode;
void setLightingMode(LightingMode mode);
LightingMode getLightingMode() const { return _lightingMode; }
void setLight(osg::Light* light) { _light = light; }
osg::Light* getLight() { return _light.get(); }
const osg::Light* getLight() const { return _light.get(); }
void setState(osg::State* state) { _renderInfo.setState(state); }
osg::State* getState() { return _renderInfo.getState(); }
const osg::State* getState() const { return _renderInfo.getState(); }
void setView(osg::View* view) { _camera->setView(view); }
osg::View* getView() { return _camera->getView(); }
const osg::View* getView() const { return _camera->getView(); }
void setRenderInfo(osg::RenderInfo& renderInfo) { _renderInfo = renderInfo; }
osg::RenderInfo& getRenderInfo() { return _renderInfo; }
const osg::RenderInfo& getRenderInfo() const { return _renderInfo; }
inline void setProjectionMatrix(const osg::Matrixf& matrix) { _camera->setProjectionMatrix(matrix); }
inline void setProjectionMatrix(const osg::Matrixd& matrix) { _camera->setProjectionMatrix(matrix); }
void setProjectionMatrixAsOrtho(double left, double right,
double bottom, double top,
double zNear, double zFar);
void setProjectionMatrixAsOrtho2D(double left, double right,
double bottom, double top);
void setProjectionMatrixAsFrustum(double left, double right,
double bottom, double top,
double zNear, double zFar);
void setProjectionMatrixAsPerspective(double fovy,double aspectRatio,
double zNear, double zFar);
osg::Matrixd& getProjectionMatrix() { return _camera->getProjectionMatrix(); }
const osg::Matrixd& getProjectionMatrix() const { return _camera->getProjectionMatrix(); }
bool getProjectionMatrixAsOrtho(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar) const;
bool getProjectionMatrixAsFrustum(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar) const;
bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio,
double& zNear, double& zFar) const;
inline void setViewMatrix(const osg::Matrixf& matrix) { _camera->setViewMatrix(matrix); }
inline void setViewMatrix(const osg::Matrixd& matrix) { _camera->setViewMatrix(matrix); }
void setViewMatrixAsLookAt(const osg::Vec3& eye,const osg::Vec3& center,const osg::Vec3& up);
osg::Matrixd& getViewMatrix() { return _camera->getViewMatrix(); }
const osg::Matrixd& getViewMatrix() const { return _camera->getViewMatrix(); }
void getViewMatrixAsLookAt(osg::Vec3& eye,osg::Vec3& center,osg::Vec3& up,float lookDistance=1.0f) const;
void setInitVisitor(osg::NodeVisitor* av) { _initVisitor = av; }
osg::NodeVisitor* getInitVisitor() { return _initVisitor.get(); }
const osg::NodeVisitor* getInitVisitor() const { return _initVisitor.get(); }
void setUpdateVisitor(osg::NodeVisitor* av) { _updateVisitor = av; }
osg::NodeVisitor* getUpdateVisitor() { return _updateVisitor.get(); }
const osg::NodeVisitor* getUpdateVisitor() const { return _updateVisitor.get(); }
void setCullVisitor(osgUtil::CullVisitor* cv) { _cullVisitor = cv; }
osgUtil::CullVisitor* getCullVisitor() { return _cullVisitor.get(); }
const osgUtil::CullVisitor* getCullVisitor() const { return _cullVisitor.get(); }
void setCullVisitorLeft(osgUtil::CullVisitor* cv) { _cullVisitorLeft = cv; }
osgUtil::CullVisitor* getCullVisitorLeft() { return _cullVisitorLeft.get(); }
const osgUtil::CullVisitor* getCullVisitorLeft() const { return _cullVisitorLeft.get(); }
void setCullVisitorRight(osgUtil::CullVisitor* cv) { _cullVisitorRight = cv; }
osgUtil::CullVisitor* getCullVisitorRight() { return _cullVisitorRight.get(); }
const osgUtil::CullVisitor* getCullVisitorRight() const { return _cullVisitorRight.get(); }
void setCollectOccludersVisitor(osg::CollectOccludersVisitor* cov) { _collectOccludersVisitor = cov; }
osg::CollectOccludersVisitor* getCollectOccludersVisitor() { return _collectOccludersVisitor.get(); }
const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisitor.get(); }
void setStateGraph(osgUtil::StateGraph* rg) { _stateGraph = rg; }
osgUtil::StateGraph* getStateGraph() { return _stateGraph.get(); }
const osgUtil::StateGraph* getStateGraph() const { return _stateGraph.get(); }
void setStateGraphLeft(osgUtil::StateGraph* rg) { _stateGraphLeft = rg; }
osgUtil::StateGraph* getStateGraphLeft() { return _stateGraphLeft.get(); }
const osgUtil::StateGraph* getStateGraphLeft() const { return _stateGraphLeft.get(); }
void setStateGraphRight(osgUtil::StateGraph* rg) { _stateGraphRight = rg; }
osgUtil::StateGraph* getStateGraphRight() { return _stateGraphRight.get(); }
const osgUtil::StateGraph* getStateGraphRight() const { return _stateGraphRight.get(); }
void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; }
osgUtil::RenderStage* getRenderStage() { return _renderStage.get(); }
const osgUtil::RenderStage* getRenderStage() const { return _renderStage.get(); }
void setRenderStageLeft(osgUtil::RenderStage* rs) { _renderStageLeft = rs; }
osgUtil::RenderStage* getRenderStageLeft() { return _renderStageLeft.get(); }
const osgUtil::RenderStage* getRenderStageLeft() const { return _renderStageLeft.get(); }
void setRenderStageRight(osgUtil::RenderStage* rs) { _renderStageRight = rs; }
osgUtil::RenderStage* getRenderStageRight() { return _renderStageRight.get(); }
const osgUtil::RenderStage* getRenderStageRight() const { return _renderStageRight.get(); }
void collateReferencesToDependentCameras();
void clearReferencesToDependentCameras();
void setDrawBufferValue( GLenum drawBufferValue ) { _camera->setDrawBuffer(drawBufferValue); }
GLenum getDrawBufferValue() const { return _camera->getDrawBuffer(); }
enum FusionDistanceMode
{
USE_FUSION_DISTANCE_VALUE,
PROPORTIONAL_TO_SCREEN_DISTANCE
};
void setFusionDistance(FusionDistanceMode mode,float value=1.0f)
{
_fusionDistanceMode = mode;
_fusionDistanceValue = value;
}
FusionDistanceMode getFusionDistanceMode() const { return _fusionDistanceMode; }
float getFusionDistanceValue() const { return _fusionDistanceValue; }
void setPrioritizeTextures(bool pt) { _prioritizeTextures = pt; }
bool getPrioritizeTextures() const { return _prioritizeTextures; }
struct ComputeStereoMatricesCallback : public osg::Referenced
{
virtual osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& projection) const = 0;
virtual osg::Matrixd computeLeftEyeView(const osg::Matrixd& view) const = 0;
virtual osg::Matrixd computeRightEyeProjection(const osg::Matrixd& projection) const = 0;
virtual osg::Matrixd computeRightEyeView(const osg::Matrixd& view) const = 0;
};
void setComputeStereoMatricesCallback(ComputeStereoMatricesCallback* callback) { _computeStereoMatricesCallback=callback; }
ComputeStereoMatricesCallback* getComputeStereoMatricesCallback() { return _computeStereoMatricesCallback.get(); }
const ComputeStereoMatricesCallback* getComputeStereoMatricesCallback() const { return _computeStereoMatricesCallback.get(); }
bool projectWindowIntoObject(const osg::Vec3& window,osg::Vec3& object) const;
bool projectWindowXYIntoObject(int x,int y,osg::Vec3& near_point,osg::Vec3& far_point) const;
bool projectObjectIntoWindow(const osg::Vec3& object,osg::Vec3& window) const;
inline void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; }
inline osg::FrameStamp* getFrameStamp() { return _frameStamp.get(); }
inline const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); }
inline osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& projection) const
{
if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeProjection(projection);
else return computeLeftEyeProjectionImplementation(projection);
}
inline osg::Matrixd computeLeftEyeView(const osg::Matrixd& view) const
{
if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeView(view);
else return computeLeftEyeViewImplementation(view);
}
inline osg::Matrixd computeRightEyeProjection(const osg::Matrixd& projection) const
{
if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeProjection(projection);
else return computeRightEyeProjectionImplementation(projection);
}
inline osg::Matrixd computeRightEyeView(const osg::Matrixd& view) const
{
if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeView(view);
else return computeRightEyeViewImplementation(view);
}
virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd& projection) const;
virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd& view) const;
virtual osg::Matrixd computeRightEyeProjectionImplementation(const osg::Matrixd& projection) const;
virtual osg::Matrixd computeRightEyeViewImplementation(const osg::Matrixd& view) const;
virtual void inheritCullSettings(const osg::CullSettings& settings) { inheritCullSettings(settings, _inheritanceMask); }
virtual void inheritCullSettings(const osg::CullSettings& settings, unsigned int inheritanceMask);
virtual void init();
virtual void update();
virtual void cull();
virtual void draw();
unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; }
virtual void releaseAllGLObjects();
virtual void resizeGLObjectBuffers(unsigned int maxSize);
virtual void releaseGLObjects(osg::State* = 0) const;
virtual void flushAllDeletedGLObjects();
virtual void flushDeletedGLObjects(double& availableTime);
bool getStats(Statistics& primStats);
void setAutomaticFlush(bool automaticFlush) { _automaticFlush = automaticFlush; }
bool getAutomaticFlush() const { return _automaticFlush; }
void setResetColorMaskToAllOn(bool enable) { _resetColorMaskToAllEnabled = enable; }
bool getResetColorMaskToAllOn() const { return _resetColorMaskToAllEnabled; }
protected:
virtual ~SceneView();
virtual bool cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage, osg::Viewport *viewport);
void computeLeftEyeViewport(const osg::Viewport *viewport);
void computeRightEyeViewport(const osg::Viewport *viewport);
const osg::Matrix computeMVPW() const;
void clearArea(int x,int y,int width,int height,const osg::Vec4& color);
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<ComputeStereoMatricesCallback> _computeStereoMatricesCallback;
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorLeft;
osg::ref_ptr<osgUtil::StateGraph> _stateGraphLeft;
osg::ref_ptr<osgUtil::RenderStage> _renderStageLeft;
osg::ref_ptr<osg::Viewport> _viewportLeft;
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorRight;
osg::ref_ptr<osgUtil::StateGraph> _stateGraphRight;
osg::ref_ptr<osgUtil::RenderStage> _renderStageRight;
osg::ref_ptr<osg::Viewport> _viewportRight;
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;
FusionDistanceMode _fusionDistanceMode;
float _fusionDistanceValue;
LightingMode _lightingMode;
bool _prioritizeTextures;
bool _automaticFlush;
bool _requiresFlush;
int _activeUniforms;
double _previousFrameTime;
double _previousSimulationTime;
bool _redrawInterlacedStereoStencilMask;
int _interlacedStereoStencilWidth;
int _interlacedStereoStencilHeight;
unsigned int _dynamicObjectCount;
bool _resetColorMaskToAllEnabled;
};
}
#endif
Camera
CollectOccludersVisitor
CullSettings
CullVisitor
DisplaySettings
FrameStamp
Light
Node
StateSet
osgUtil::CullVisitor
Definition CullVisitor:49
osgUtil::RenderStage
Definition RenderStage:38
osgUtil::SceneView::computeRightEyeView
osg::Matrixd computeRightEyeView(const osg::Matrixd &view) const
Definition SceneView:435
osgUtil::SceneView::setFrameStamp
void setFrameStamp(osg::FrameStamp *fs)
Definition SceneView:408
osgUtil::SceneView::setFusionDistance
void setFusionDistance(FusionDistanceMode mode, float value=1.0f)
Definition SceneView:347
osgUtil::SceneView::_updateVisitor
osg::ref_ptr< osg::NodeVisitor > _updateVisitor
Definition SceneView:525
osgUtil::SceneView::setLight
void setLight(osg::Light *light)
Definition SceneView:180
osgUtil::SceneView::setDefaults
virtual void setDefaults()
Definition SceneView:63
osgUtil::SceneView::_previousFrameTime
double _previousFrameTime
Definition SceneView:566
osgUtil::SceneView::inheritCullSettings
virtual void inheritCullSettings(const osg::CullSettings &settings)
Definition SceneView:455
osgUtil::SceneView::getStateGraphLeft
osgUtil::StateGraph * getStateGraphLeft()
Definition SceneView:303
osgUtil::SceneView::setPrioritizeTextures
void setPrioritizeTextures(bool pt)
Definition SceneView:361
osgUtil::SceneView::getUpdateVisitor
osg::NodeVisitor * getUpdateVisitor()
Definition SceneView:277
osgUtil::SceneView::getDisplaySettings
osg::DisplaySettings * getDisplaySettings()
Definition SceneView:117
osgUtil::SceneView::setComputeStereoMatricesCallback
void setComputeStereoMatricesCallback(ComputeStereoMatricesCallback *callback)
Definition SceneView:376
osgUtil::SceneView::_dynamicObjectCount
unsigned int _dynamicObjectCount
Definition SceneView:573
osgUtil::SceneView::getCamera
osg::Camera * getCamera()
Definition SceneView:74
osgUtil::SceneView::setProjectionMatrixAsOrtho
void setProjectionMatrixAsOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
osgUtil::SceneView::getCullVisitorRight
const osgUtil::CullVisitor * getCullVisitorRight() const
Definition SceneView:291
osgUtil::SceneView::setViewMatrix
void setViewMatrix(const osg::Matrixf &matrix)
Definition SceneView:251
osgUtil::SceneView::getView
const osg::View * getView() const
Definition SceneView:190
osgUtil::SceneView::setRenderStage
void setRenderStage(osgUtil::RenderStage *rs)
Definition SceneView:311
osgUtil::SceneView::_stateGraphRight
osg::ref_ptr< osgUtil::StateGraph > _stateGraphRight
Definition SceneView:538
osgUtil::SceneView::getPrioritizeTextures
bool getPrioritizeTextures() const
Definition SceneView:364
osgUtil::SceneView::computeRightEyeViewport
void computeRightEyeViewport(const osg::Viewport *viewport)
osgUtil::SceneView::_lightingMode
LightingMode _lightingMode
Definition SceneView:558
osgUtil::SceneView::getViewport
osg::Viewport * getViewport()
Definition SceneView:105
osgUtil::SceneView::getNumSceneData
unsigned int getNumSceneData() const
Definition SceneView:95
osgUtil::SceneView::setClearColor
void setClearColor(const osg::Vec4 &color)
Definition SceneView:122
osgUtil::SceneView::_fusionDistanceMode
FusionDistanceMode _fusionDistanceMode
Definition SceneView:555
osgUtil::SceneView::getFrameStamp
const osg::FrameStamp * getFrameStamp() const
Definition SceneView:414
osgUtil::SceneView::getLight
const osg::Light * getLight() const
Definition SceneView:182
osgUtil::SceneView::setDrawBufferValue
void setDrawBufferValue(GLenum drawBufferValue)
Definition SceneView:331
osgUtil::SceneView::releaseGLObjects
virtual void releaseGLObjects(osg::State *=0) const
osgUtil::SceneView::_stateGraphLeft
osg::ref_ptr< osgUtil::StateGraph > _stateGraphLeft
Definition SceneView:533
osgUtil::SceneView::getViewMatrixAsLookAt
void getViewMatrixAsLookAt(osg::Vec3 &eye, osg::Vec3 &center, osg::Vec3 &up, float lookDistance=1.0f) const
osgUtil::SceneView::getProjectionMatrix
const osg::Matrixd & getProjectionMatrix() const
Definition SceneView:227
osgUtil::SceneView::_interlacedStereoStencilWidth
int _interlacedStereoStencilWidth
Definition SceneView:570
osgUtil::SceneView::getProjectionMatrixAsPerspective
bool getProjectionMatrixAsPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
osgUtil::SceneView::_renderInfo
osg::RenderInfo _renderInfo
Definition SceneView:521
osgUtil::SceneView::getComputeStereoMatricesCallback
const ComputeStereoMatricesCallback * getComputeStereoMatricesCallback() const
Definition SceneView:378
osgUtil::SceneView::getUpdateVisitor
const osg::NodeVisitor * getUpdateVisitor() const
Definition SceneView:278
osgUtil::SceneView::_secondaryStateSet
osg::ref_ptr< osg::StateSet > _secondaryStateSet
Definition SceneView:553
osgUtil::SceneView::_stateGraph
osg::ref_ptr< osgUtil::StateGraph > _stateGraph
Definition SceneView:527
osgUtil::SceneView::_fusionDistanceValue
float _fusionDistanceValue
Definition SceneView:556
osgUtil::SceneView::setActiveUniforms
void setActiveUniforms(int activeUniforms)
Definition SceneView:167
osgUtil::SceneView::setStateGraphLeft
void setStateGraphLeft(osgUtil::StateGraph *rg)
Definition SceneView:302
osgUtil::SceneView::getCollectOccludersVisitor
const osg::CollectOccludersVisitor * getCollectOccludersVisitor() const
Definition SceneView:295
osgUtil::SceneView::getStateGraph
const osgUtil::StateGraph * getStateGraph() const
Definition SceneView:300
osgUtil::SceneView::_cullVisitorRight
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorRight
Definition SceneView:537
osgUtil::SceneView::computeMVPW
const osg::Matrix computeMVPW() const
osgUtil::SceneView::_renderStageRight
osg::ref_ptr< osgUtil::RenderStage > _renderStageRight
Definition SceneView:539
osgUtil::SceneView::computeRightEyeProjection
osg::Matrixd computeRightEyeProjection(const osg::Matrixd &projection) const
Definition SceneView:429
osgUtil::SceneView::setProjectionMatrix
void setProjectionMatrix(const osg::Matrixd &matrix)
Definition SceneView:202
osgUtil::SceneView::_frameStamp
osg::ref_ptr< osg::FrameStamp > _frameStamp
Definition SceneView:544
osgUtil::SceneView::getSecondaryStateSet
osg::StateSet * getSecondaryStateSet()
Definition SceneView:140
osgUtil::SceneView::getCullVisitor
osgUtil::CullVisitor * getCullVisitor()
Definition SceneView:282
osgUtil::SceneView::setViewport
void setViewport(int x, int y, int width, int height)
Definition SceneView:101
osgUtil::SceneView::update
virtual void update()
osgUtil::SceneView::getProjectionMatrix
osg::Matrixd & getProjectionMatrix()
Definition SceneView:224
osgUtil::SceneView::setRenderInfo
void setRenderInfo(osg::RenderInfo &renderInfo)
Definition SceneView:192
osgUtil::SceneView::getStateGraphRight
const osgUtil::StateGraph * getStateGraphRight() const
Definition SceneView:308
osgUtil::SceneView::_requiresFlush
bool _requiresFlush
Definition SceneView:563
osgUtil::SceneView::setDefaults
virtual void setDefaults(unsigned int options)
osgUtil::SceneView::setView
void setView(osg::View *view)
Definition SceneView:188
osgUtil::SceneView::getStateGraphRight
osgUtil::StateGraph * getStateGraphRight()
Definition SceneView:307
osgUtil::SceneView::computeRightEyeProjectionImplementation
virtual osg::Matrixd computeRightEyeProjectionImplementation(const osg::Matrixd &projection) const
osgUtil::SceneView::setRedrawInterlacedStereoStencilMask
void setRedrawInterlacedStereoStencilMask(bool flag)
Definition SceneView:129
osgUtil::SceneView::setResetColorMaskToAllOn
void setResetColorMaskToAllOn(bool enable)
Definition SceneView:503
osgUtil::SceneView::getCullVisitor
const osgUtil::CullVisitor * getCullVisitor() const
Definition SceneView:283
osgUtil::SceneView::SceneView
SceneView(osg::DisplaySettings *ds=NULL)
osgUtil::SceneView::setCollectOccludersVisitor
void setCollectOccludersVisitor(osg::CollectOccludersVisitor *cov)
Definition SceneView:293
osgUtil::SceneView::getInitVisitor
osg::NodeVisitor * getInitVisitor()
Definition SceneView:272
osgUtil::SceneView::getAutomaticFlush
bool getAutomaticFlush() const
Definition SceneView:501
osgUtil::SceneView::getActiveUniforms
int getActiveUniforms() const
Definition SceneView:170
osgUtil::SceneView::setStateGraphRight
void setStateGraphRight(osgUtil::StateGraph *rg)
Definition SceneView:306
osgUtil::SceneView::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osgUtil::SceneView::draw
virtual void draw()
osgUtil::SceneView::getRenderStage
const osgUtil::RenderStage * getRenderStage() const
Definition SceneView:313
osgUtil::SceneView::setUpdateVisitor
void setUpdateVisitor(osg::NodeVisitor *av)
Definition SceneView:276
osgUtil::SceneView::setLocalStateSet
void setLocalStateSet(osg::StateSet *state)
Definition SceneView:143
osgUtil::SceneView::collateReferencesToDependentCameras
void collateReferencesToDependentCameras()
osgUtil::SceneView::getProjectionMatrixAsOrtho
bool getProjectionMatrixAsOrtho(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
osgUtil::SceneView::setCullVisitorRight
void setCullVisitorRight(osgUtil::CullVisitor *cv)
Definition SceneView:289
osgUtil::SceneView::computeLeftEyeViewImplementation
virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd &view) const
osgUtil::SceneView::getCullVisitorLeft
const osgUtil::CullVisitor * getCullVisitorLeft() const
Definition SceneView:287
osgUtil::SceneView::getCullVisitorLeft
osgUtil::CullVisitor * getCullVisitorLeft()
Definition SceneView:286
osgUtil::SceneView::getFusionDistanceValue
float getFusionDistanceValue() const
Definition SceneView:357
osgUtil::SceneView::ActiveUniforms
ActiveUniforms
Definition SceneView:148
osgUtil::SceneView::VIEW_MATRIX_UNIFORM
@ VIEW_MATRIX_UNIFORM
Definition SceneView:154
osgUtil::SceneView::DELTA_FRAME_TIME_UNIFORM
@ DELTA_FRAME_TIME_UNIFORM
Definition SceneView:151
osgUtil::SceneView::ALL_UNIFORMS
@ ALL_UNIFORMS
Definition SceneView:163
osgUtil::SceneView::FRAME_TIME_UNIFORM
@ FRAME_TIME_UNIFORM
Definition SceneView:150
osgUtil::SceneView::FRAME_NUMBER_UNIFORM
@ FRAME_NUMBER_UNIFORM
Definition SceneView:149
osgUtil::SceneView::DELTA_SIMULATION_TIME_UNIFORM
@ DELTA_SIMULATION_TIME_UNIFORM
Definition SceneView:153
osgUtil::SceneView::DEFAULT_UNIFORMS
@ DEFAULT_UNIFORMS
Definition SceneView:156
osgUtil::SceneView::SIMULATION_TIME_UNIFORM
@ SIMULATION_TIME_UNIFORM
Definition SceneView:152
osgUtil::SceneView::VIEW_MATRIX_INVERSE_UNIFORM
@ VIEW_MATRIX_INVERSE_UNIFORM
Definition SceneView:155
osgUtil::SceneView::_initCalled
bool _initCalled
Definition SceneView:523
osgUtil::SceneView::getRenderStageLeft
const osgUtil::RenderStage * getRenderStageLeft() const
Definition SceneView:317
osgUtil::SceneView::setCullVisitorLeft
void setCullVisitorLeft(osgUtil::CullVisitor *cv)
Definition SceneView:285
osgUtil::SceneView::getRenderInfo
const osg::RenderInfo & getRenderInfo() const
Definition SceneView:194
osgUtil::SceneView::getLocalStateSet
osg::StateSet * getLocalStateSet()
Definition SceneView:144
osgUtil::SceneView::getView
osg::View * getView()
Definition SceneView:189
osgUtil::SceneView::setSceneData
void setSceneData(osg::Node *node)
osgUtil::SceneView::getRedrawInterlacedStereoStencilMask
bool getRedrawInterlacedStereoStencilMask() const
Definition SceneView:132
osgUtil::SceneView::setViewport
void setViewport(osg::Viewport *viewport)
Definition SceneView:98
osgUtil::SceneView::_globalStateSet
osg::ref_ptr< osg::StateSet > _globalStateSet
Definition SceneView:549
osgUtil::SceneView::getGlobalStateSet
const osg::StateSet * getGlobalStateSet() const
Definition SceneView:137
osgUtil::SceneView::_displaySettings
osg::ref_ptr< osg::DisplaySettings > _displaySettings
Definition SceneView:551
osgUtil::SceneView::setProjectionMatrixAsPerspective
void setProjectionMatrixAsPerspective(double fovy, double aspectRatio, double zNear, double zFar)
osgUtil::SceneView::getViewMatrix
const osg::Matrixd & getViewMatrix() const
Definition SceneView:263
osgUtil::SceneView::getState
osg::State * getState()
Definition SceneView:185
osgUtil::SceneView::getLightingMode
LightingMode getLightingMode() const
Definition SceneView:178
osgUtil::SceneView::setState
void setState(osg::State *state)
Definition SceneView:184
osgUtil::SceneView::setViewMatrix
void setViewMatrix(const osg::Matrixd &matrix)
Definition SceneView:254
osgUtil::SceneView::_redrawInterlacedStereoStencilMask
bool _redrawInterlacedStereoStencilMask
Definition SceneView:569
osgUtil::SceneView::updateUniforms
void updateUniforms()
osgUtil::SceneView::_resetColorMaskToAllEnabled
bool _resetColorMaskToAllEnabled
Definition SceneView:575
osgUtil::SceneView::setProjectionMatrixAsFrustum
void setProjectionMatrixAsFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
osgUtil::SceneView::getLocalStateSet
const osg::StateSet * getLocalStateSet() const
Definition SceneView:145
osgUtil::SceneView::setCamera
void setCamera(osg::Camera *camera, bool assumeOwnershipOfCamera=true)
osgUtil::SceneView::projectObjectIntoWindow
bool projectObjectIntoWindow(const osg::Vec3 &object, osg::Vec3 &window) const
osgUtil::SceneView::inheritCullSettings
virtual void inheritCullSettings(const osg::CullSettings &settings, unsigned int inheritanceMask)
osgUtil::SceneView::_renderStageLeft
osg::ref_ptr< osgUtil::RenderStage > _renderStageLeft
Definition SceneView:534
osgUtil::SceneView::getViewport
const osg::Viewport * getViewport() const
Definition SceneView:108
osgUtil::SceneView::_collectOccludersVisitor
osg::ref_ptr< osg::CollectOccludersVisitor > _collectOccludersVisitor
Definition SceneView:542
osgUtil::SceneView::getRenderStageRight
const osgUtil::RenderStage * getRenderStageRight() const
Definition SceneView:321
osgUtil::SceneView::SceneView
SceneView(const SceneView &sceneview, const osg::CopyOp &copyop=osg::CopyOp())
osgUtil::SceneView::computeRightEyeViewImplementation
virtual osg::Matrixd computeRightEyeViewImplementation(const osg::Matrixd &view) const
osgUtil::SceneView::clearReferencesToDependentCameras
void clearReferencesToDependentCameras()
osgUtil::SceneView::_viewportLeft
osg::ref_ptr< osg::Viewport > _viewportLeft
Definition SceneView:535
osgUtil::SceneView::cull
virtual void cull()
osgUtil::SceneView::_cameraWithOwnership
osg::ref_ptr< osg::Camera > _cameraWithOwnership
Definition SceneView:547
osgUtil::SceneView::_previousSimulationTime
double _previousSimulationTime
Definition SceneView:567
osgUtil::SceneView::cullStage
virtual bool cullStage(const osg::Matrixd &projection, const osg::Matrixd &modelview, osgUtil::CullVisitor *cullVisitor, osgUtil::StateGraph *rendergraph, osgUtil::RenderStage *renderStage, osg::Viewport *viewport)
osgUtil::SceneView::_automaticFlush
bool _automaticFlush
Definition SceneView:562
osgUtil::SceneView::setRenderStageRight
void setRenderStageRight(osgUtil::RenderStage *rs)
Definition SceneView:319
osgUtil::SceneView::flushAllDeletedGLObjects
virtual void flushAllDeletedGLObjects()
osgUtil::SceneView::getInitVisitor
const osg::NodeVisitor * getInitVisitor() const
Definition SceneView:273
osgUtil::SceneView::computeLeftEyeView
osg::Matrixd computeLeftEyeView(const osg::Matrixd &view) const
Definition SceneView:423
osgUtil::SceneView::getStateGraphLeft
const osgUtil::StateGraph * getStateGraphLeft() const
Definition SceneView:304
osgUtil::SceneView::LightingMode
Options LightingMode
Definition SceneView:175
osgUtil::SceneView::getRenderStageLeft
osgUtil::RenderStage * getRenderStageLeft()
Definition SceneView:316
osgUtil::SceneView::setDisplaySettings
void setDisplaySettings(osg::DisplaySettings *vs)
Definition SceneView:111
osgUtil::SceneView::getSceneData
osg::Node * getSceneData(unsigned int childNo=0)
Definition SceneView:87
osgUtil::SceneView::_cullVisitor
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitor
Definition SceneView:526
osgUtil::SceneView::getViewMatrix
osg::Matrixd & getViewMatrix()
Definition SceneView:260
osgUtil::SceneView::_light
osg::ref_ptr< osg::Light > _light
Definition SceneView:550
osgUtil::SceneView::computeLeftEyeProjectionImplementation
virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd &projection) const
osgUtil::SceneView::FusionDistanceMode
FusionDistanceMode
Definition SceneView:339
osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE
@ PROPORTIONAL_TO_SCREEN_DISTANCE
Definition SceneView:343
osgUtil::SceneView::USE_FUSION_DISTANCE_VALUE
@ USE_FUSION_DISTANCE_VALUE
Definition SceneView:341
osgUtil::SceneView::getStateGraph
osgUtil::StateGraph * getStateGraph()
Definition SceneView:299
osgUtil::SceneView::getDynamicObjectCount
unsigned int getDynamicObjectCount() const
Definition SceneView:480
osgUtil::SceneView::setStateGraph
void setStateGraph(osgUtil::StateGraph *rg)
Definition SceneView:298
osgUtil::SceneView::setCullVisitor
void setCullVisitor(osgUtil::CullVisitor *cv)
Definition SceneView:281
osgUtil::SceneView::getState
const osg::State * getState() const
Definition SceneView:186
osgUtil::SceneView::getRenderInfo
osg::RenderInfo & getRenderInfo()
Definition SceneView:193
osgUtil::SceneView::getProjectionMatrixAsFrustum
bool getProjectionMatrixAsFrustum(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
osgUtil::SceneView::_localStateSet
osg::ref_ptr< osg::StateSet > _localStateSet
Definition SceneView:520
osgUtil::SceneView::clearArea
void clearArea(int x, int y, int width, int height, const osg::Vec4 &color)
osgUtil::SceneView::_prioritizeTextures
bool _prioritizeTextures
Definition SceneView:560
osgUtil::SceneView::_renderStage
osg::ref_ptr< osgUtil::RenderStage > _renderStage
Definition SceneView:528
osgUtil::SceneView::releaseAllGLObjects
virtual void releaseAllGLObjects()
osgUtil::SceneView::getStats
bool getStats(Statistics &primStats)
osgUtil::SceneView::_viewportRight
osg::ref_ptr< osg::Viewport > _viewportRight
Definition SceneView:540
osgUtil::SceneView::setSecondaryStateSet
void setSecondaryStateSet(osg::StateSet *state)
Definition SceneView:139
osgUtil::SceneView::Options
Options
Definition SceneView:48
osgUtil::SceneView::NO_SCENEVIEW_LIGHT
@ NO_SCENEVIEW_LIGHT
Definition SceneView:49
osgUtil::SceneView::APPLY_GLOBAL_DEFAULTS
@ APPLY_GLOBAL_DEFAULTS
Definition SceneView:53
osgUtil::SceneView::CLEAR_GLOBAL_STATESET
@ CLEAR_GLOBAL_STATESET
Definition SceneView:54
osgUtil::SceneView::COMPILE_GLOBJECTS_AT_INIT
@ COMPILE_GLOBJECTS_AT_INIT
Definition SceneView:52
osgUtil::SceneView::SKY_LIGHT
@ SKY_LIGHT
Definition SceneView:51
osgUtil::SceneView::HEADLIGHT
@ HEADLIGHT
Definition SceneView:50
osgUtil::SceneView::STANDARD_SETTINGS
@ STANDARD_SETTINGS
Definition SceneView:55
osgUtil::SceneView::computeLeftEyeProjection
osg::Matrixd computeLeftEyeProjection(const osg::Matrixd &projection) const
Definition SceneView:417
osgUtil::SceneView::getSecondaryStateSet
const osg::StateSet * getSecondaryStateSet() const
Definition SceneView:141
osgUtil::SceneView::getGlobalStateSet
osg::StateSet * getGlobalStateSet()
Definition SceneView:136
osgUtil::SceneView::getRenderStage
osgUtil::RenderStage * getRenderStage()
Definition SceneView:312
osgUtil::SceneView::setProjectionMatrixAsOrtho2D
void setProjectionMatrixAsOrtho2D(double left, double right, double bottom, double top)
osgUtil::SceneView::_cullVisitorLeft
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorLeft
Definition SceneView:532
osgUtil::SceneView::_initVisitor
osg::ref_ptr< osg::NodeVisitor > _initVisitor
Definition SceneView:524
osgUtil::SceneView::getComputeStereoMatricesCallback
ComputeStereoMatricesCallback * getComputeStereoMatricesCallback()
Definition SceneView:377
osgUtil::SceneView::getCullVisitorRight
osgUtil::CullVisitor * getCullVisitorRight()
Definition SceneView:290
osgUtil::SceneView::getDrawBufferValue
GLenum getDrawBufferValue() const
Definition SceneView:334
osgUtil::SceneView::~SceneView
virtual ~SceneView()
osgUtil::SceneView::setLightingMode
void setLightingMode(LightingMode mode)
osgUtil::SceneView::_computeStereoMatricesCallback
osg::ref_ptr< ComputeStereoMatricesCallback > _computeStereoMatricesCallback
Definition SceneView:530
osgUtil::SceneView::flushDeletedGLObjects
virtual void flushDeletedGLObjects(double &availableTime)
osgUtil::SceneView::getCamera
const osg::Camera * getCamera() const
Definition SceneView:77
osgUtil::SceneView::getClearColor
const osg::Vec4 & getClearColor() const
Definition SceneView:125
osgUtil::SceneView::setGlobalStateSet
void setGlobalStateSet(osg::StateSet *state)
Definition SceneView:135
osgUtil::SceneView::getFusionDistanceMode
FusionDistanceMode getFusionDistanceMode() const
Definition SceneView:354
osgUtil::SceneView::setProjectionMatrix
void setProjectionMatrix(const osg::Matrixf &matrix)
Definition SceneView:199
osgUtil::SceneView::getFrameStamp
osg::FrameStamp * getFrameStamp()
Definition SceneView:411
osgUtil::SceneView::setRenderStageLeft
void setRenderStageLeft(osgUtil::RenderStage *rs)
Definition SceneView:315
osgUtil::SceneView::getLight
osg::Light * getLight()
Definition SceneView:181
osgUtil::SceneView::getCollectOccludersVisitor
osg::CollectOccludersVisitor * getCollectOccludersVisitor()
Definition SceneView:294
osgUtil::SceneView::_activeUniforms
int _activeUniforms
Definition SceneView:565
osgUtil::SceneView::projectWindowIntoObject
bool projectWindowIntoObject(const osg::Vec3 &window, osg::Vec3 &object) const
osgUtil::SceneView::setInitVisitor
void setInitVisitor(osg::NodeVisitor *av)
Definition SceneView:271
osgUtil::SceneView::getDisplaySettings
const osg::DisplaySettings * getDisplaySettings() const
Definition SceneView:114
osgUtil::SceneView::getResetColorMaskToAllOn
bool getResetColorMaskToAllOn() const
Definition SceneView:504
osgUtil::SceneView::getRenderStageRight
osgUtil::RenderStage * getRenderStageRight()
Definition SceneView:320
osgUtil::SceneView::projectWindowXYIntoObject
bool projectWindowXYIntoObject(int x, int y, osg::Vec3 &near_point, osg::Vec3 &far_point) const
osgUtil::SceneView::computeLeftEyeViewport
void computeLeftEyeViewport(const osg::Viewport *viewport)
osgUtil::SceneView::_interlacedStereoStencilHeight
int _interlacedStereoStencilHeight
Definition SceneView:571
osgUtil::SceneView::setViewMatrixAsLookAt
void setViewMatrixAsLookAt(const osg::Vec3 &eye, const osg::Vec3 &center, const osg::Vec3 &up)
osgUtil::SceneView::init
virtual void init()
osgUtil::SceneView::_camera
osg::observer_ptr< osg::Camera > _camera
Definition SceneView:546
osgUtil::SceneView::setAutomaticFlush
void setAutomaticFlush(bool automaticFlush)
Definition SceneView:500
osgUtil::SceneView::getSceneData
const osg::Node * getSceneData(unsigned int childNo=0) const
Definition SceneView:92
osgUtil::SceneView::META_Object
META_Object(osgUtil, SceneView)
osgUtil::StateGraph
Definition StateGraph:42
osgUtil::Statistics
Definition Statistics:48
osg::Camera
Definition Camera:45
osg::CollectOccludersVisitor
Definition CollectOccludersVisitor:25
osg::CopyOp
Definition CopyOp:41
osg::CullSettings
Definition CullSettings:28
osg::CullSettings::_inheritanceMask
InheritanceMask _inheritanceMask
Definition CullSettings:251
osg::DisplaySettings
Definition DisplaySettings:34
osg::FrameStamp
Definition FrameStamp:35
osg::Light
Definition Light:40
osg::Matrixd
Definition Matrixd:27
osg::Matrixf
Definition Matrixf:27
osg::NodeVisitor
Definition NodeVisitor:82
osg::Node
Definition Node:72
osg::Object
Definition Object:61
osg::Referenced
Definition Referenced:44
osg::RenderInfo
Definition RenderInfo:28
osg::StateSet
Definition StateSet:46
osg::State
Definition State:80
osg::View
Definition osg/View:30
osg::Viewport
Definition Viewport:24
osg::observer_ptr
Definition observer_ptr:39
osg::ref_ptr
Definition ref_ptr:32
osgUtil
Definition NodeVisitor:25
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::Matrix
Matrixd Matrix
Definition Matrix:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
OSGUTIL_EXPORT
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40
NULL
#define NULL
Definition osg/Export:55
osgUtil::SceneView::ComputeStereoMatricesCallback
Definition SceneView:368
osgUtil::SceneView::ComputeStereoMatricesCallback::computeRightEyeProjection
virtual osg::Matrixd computeRightEyeProjection(const osg::Matrixd &projection) const =0
osgUtil::SceneView::ComputeStereoMatricesCallback::computeLeftEyeProjection
virtual osg::Matrixd computeLeftEyeProjection(const osg::Matrixd &projection) const =0
osgUtil::SceneView::ComputeStereoMatricesCallback::computeLeftEyeView
virtual osg::Matrixd computeLeftEyeView(const osg::Matrixd &view) const =0
osgUtil::SceneView::ComputeStereoMatricesCallback::computeRightEyeView
virtual osg::Matrixd computeRightEyeView(const osg::Matrixd &view) const =0