OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SceneView.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGUTIL_SCENEVIEW
15 #define OSGUTIL_SCENEVIEW 1
16 
17 #include <osg/Node>
18 #include <osg/StateSet>
19 #include <osg/Light>
20 #include <osg/FrameStamp>
21 #include <osg/DisplaySettings>
22 #include <osg/CollectOccludersVisitor>
23 #include <osg/CullSettings>
24 #include <osg/Camera>
25 
26 #include <osgUtil/CullVisitor>
27 
28 namespace osgUtil {
29 
37 {
38  public:
39 
42 
43  SceneView(const SceneView& sceneview, const osg::CopyOp& copyop = osg::CopyOp());
44 
46 
47  enum Options
48  {
49  NO_SCENEVIEW_LIGHT = 0x0,
50  HEADLIGHT = 0x1,
51  SKY_LIGHT = 0x2,
52  COMPILE_GLOBJECTS_AT_INIT = 0x4,
53  APPLY_GLOBAL_DEFAULTS = 0x8,
54  CLEAR_GLOBAL_STATESET = 0x10,
55  STANDARD_SETTINGS = HEADLIGHT |
56  COMPILE_GLOBJECTS_AT_INIT |
57  APPLY_GLOBAL_DEFAULTS |
58  CLEAR_GLOBAL_STATESET
59 
60  };
61 
62  /* Set defaults. */
63  virtual void setDefaults() { setDefaults(STANDARD_SETTINGS); }
64 
68  virtual void setDefaults(unsigned int options);
69 
71  void setCamera(osg::Camera* camera, bool assumeOwnershipOfCamera = true);
72 
74  osg::Camera* getCamera() { return _camera.get(); }
75 
77  const osg::Camera* getCamera() const { return _camera.get(); }
78 
82  void setSceneData(osg::Node* node);
83 
87  osg::Node* getSceneData(unsigned int childNo=0) { return (_camera->getNumChildren()>childNo) ? _camera->getChild(childNo) : 0; }
88 
92  const osg::Node* getSceneData(unsigned int childNo=0) const { return (_camera->getNumChildren()>childNo) ? _camera->getChild(childNo) : 0; }
93 
95  unsigned int getNumSceneData() const { return _camera->getNumChildren(); }
96 
98  void setViewport(osg::Viewport* viewport) { _camera->setViewport(viewport); }
99 
101  void setViewport(int x,int y,int width,int height) { _camera->setViewport(x,y,width,height); }
102 
103 
105  osg::Viewport* getViewport() { return (_camera->getViewport()!=0) ? _camera->getViewport() : 0; }
106 
108  const osg::Viewport* getViewport() const { return (_camera->getViewport()!=0) ? _camera->getViewport() : 0; }
109 
111  inline void setDisplaySettings(osg::DisplaySettings* vs) { _displaySettings = vs; }
112 
114  inline const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); }
115 
117  inline osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); }
118 
119 
122  void setClearColor(const osg::Vec4& color) { _camera->setClearColor(color); }
123 
125  const osg::Vec4& getClearColor() const { return _camera->getClearColor(); }
126 
127 
129  void setRedrawInterlacedStereoStencilMask(bool flag) { _redrawInterlacedStereoStencilMask = flag; }
130 
132  bool getRedrawInterlacedStereoStencilMask() const { return _redrawInterlacedStereoStencilMask; }
133 
134 
135  void setGlobalStateSet(osg::StateSet* state) { _globalStateSet = state; }
136  osg::StateSet* getGlobalStateSet() { return _globalStateSet.get(); }
137  const osg::StateSet* getGlobalStateSet() const { return _globalStateSet.get(); }
138 
139  void setSecondaryStateSet(osg::StateSet* state) { _secondaryStateSet = state; }
140  osg::StateSet* getSecondaryStateSet() { return _secondaryStateSet.get(); }
141  const osg::StateSet* getSecondaryStateSet() const { return _secondaryStateSet.get(); }
142 
143  void setLocalStateSet(osg::StateSet* state) { _localStateSet = state; }
144  osg::StateSet* getLocalStateSet() { return _localStateSet.get(); }
145  const osg::StateSet* getLocalStateSet() const { return _localStateSet.get(); }
146 
148  {
149  FRAME_NUMBER_UNIFORM = 1,
150  FRAME_TIME_UNIFORM = 2,
151  DELTA_FRAME_TIME_UNIFORM = 4,
152  SIMULATION_TIME_UNIFORM = 8,
153  DELTA_SIMULATION_TIME_UNIFORM = 16,
154  VIEW_MATRIX_UNIFORM = 32,
155  VIEW_MATRIX_INVERSE_UNIFORM = 64,
156  DEFAULT_UNIFORMS = FRAME_NUMBER_UNIFORM |
157  FRAME_TIME_UNIFORM |
158  DELTA_FRAME_TIME_UNIFORM |
159  SIMULATION_TIME_UNIFORM |
160  DELTA_SIMULATION_TIME_UNIFORM |
161  VIEW_MATRIX_UNIFORM |
162  VIEW_MATRIX_INVERSE_UNIFORM,
163  ALL_UNIFORMS = 0x7FFFFFFF
164  };
165 
167  void setActiveUniforms(int activeUniforms) { _activeUniforms = activeUniforms; }
168 
170  int getActiveUniforms() const { return _activeUniforms; }
171 
172  void updateUniforms();
173 
174 
176 
177  void setLightingMode(LightingMode mode);
178  LightingMode getLightingMode() const { return _lightingMode; }
179 
180  void setLight(osg::Light* light) { _light = light; }
181  osg::Light* getLight() { return _light.get(); }
182  const osg::Light* getLight() const { return _light.get(); }
183 
184  void setState(osg::State* state) { _renderInfo.setState(state); }
185  osg::State* getState() { return _renderInfo.getState(); }
186  const osg::State* getState() const { return _renderInfo.getState(); }
187 
188  void setView(osg::View* view) { _camera->setView(view); }
189  osg::View* getView() { return _camera->getView(); }
190  const osg::View* getView() const { return _camera->getView(); }
191 
192  void setRenderInfo(osg::RenderInfo& renderInfo) { _renderInfo = renderInfo; }
193  osg::RenderInfo& getRenderInfo() { return _renderInfo; }
194  const osg::RenderInfo& getRenderInfo() const { return _renderInfo; }
195 
196 
197 
199  inline void setProjectionMatrix(const osg::Matrixf& matrix) { _camera->setProjectionMatrix(matrix); }
200 
202  inline void setProjectionMatrix(const osg::Matrixd& matrix) { _camera->setProjectionMatrix(matrix); }
203 
205  void setProjectionMatrixAsOrtho(double left, double right,
206  double bottom, double top,
207  double zNear, double zFar);
208 
210  void setProjectionMatrixAsOrtho2D(double left, double right,
211  double bottom, double top);
212 
214  void setProjectionMatrixAsFrustum(double left, double right,
215  double bottom, double top,
216  double zNear, double zFar);
217 
220  void setProjectionMatrixAsPerspective(double fovy,double aspectRatio,
221  double zNear, double zFar);
222 
224  osg::Matrixd& getProjectionMatrix() { return _camera->getProjectionMatrix(); }
225 
227  const osg::Matrixd& getProjectionMatrix() const { return _camera->getProjectionMatrix(); }
228 
231  bool getProjectionMatrixAsOrtho(double& left, double& right,
232  double& bottom, double& top,
233  double& zNear, double& zFar) const;
234 
237  bool getProjectionMatrixAsFrustum(double& left, double& right,
238  double& bottom, double& top,
239  double& zNear, double& zFar) const;
240 
246  bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio,
247  double& zNear, double& zFar) const;
248 
249 
251  inline void setViewMatrix(const osg::Matrixf& matrix) { _camera->setViewMatrix(matrix); }
252 
254  inline void setViewMatrix(const osg::Matrixd& matrix) { _camera->setViewMatrix(matrix); }
255 
257  void setViewMatrixAsLookAt(const osg::Vec3& eye,const osg::Vec3& center,const osg::Vec3& up);
258 
260  osg::Matrixd& getViewMatrix() { return _camera->getViewMatrix(); }
261 
263  const osg::Matrixd& getViewMatrix() const { return _camera->getViewMatrix(); }
264 
266  void getViewMatrixAsLookAt(osg::Vec3& eye,osg::Vec3& center,osg::Vec3& up,float lookDistance=1.0f) const;
267 
268 
269 
270 
271  void setInitVisitor(osg::NodeVisitor* av) { _initVisitor = av; }
272  osg::NodeVisitor* getInitVisitor() { return _initVisitor.get(); }
273  const osg::NodeVisitor* getInitVisitor() const { return _initVisitor.get(); }
274 
275 
276  void setUpdateVisitor(osg::NodeVisitor* av) { _updateVisitor = av; }
277  osg::NodeVisitor* getUpdateVisitor() { return _updateVisitor.get(); }
278  const osg::NodeVisitor* getUpdateVisitor() const { return _updateVisitor.get(); }
279 
280 
281  void setCullVisitor(osgUtil::CullVisitor* cv) { _cullVisitor = cv; }
282  osgUtil::CullVisitor* getCullVisitor() { return _cullVisitor.get(); }
283  const osgUtil::CullVisitor* getCullVisitor() const { return _cullVisitor.get(); }
284 
285  void setCullVisitorLeft(osgUtil::CullVisitor* cv) { _cullVisitorLeft = cv; }
286  osgUtil::CullVisitor* getCullVisitorLeft() { return _cullVisitorLeft.get(); }
287  const osgUtil::CullVisitor* getCullVisitorLeft() const { return _cullVisitorLeft.get(); }
288 
289  void setCullVisitorRight(osgUtil::CullVisitor* cv) { _cullVisitorRight = cv; }
290  osgUtil::CullVisitor* getCullVisitorRight() { return _cullVisitorRight.get(); }
291  const osgUtil::CullVisitor* getCullVisitorRight() const { return _cullVisitorRight.get(); }
292 
293  void setCollectOccludersVisitor(osg::CollectOccludersVisitor* cov) { _collectOccludersVisitor = cov; }
294  osg::CollectOccludersVisitor* getCollectOccludersVisitor() { return _collectOccludersVisitor.get(); }
295  const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisitor.get(); }
296 
297 
298  void setStateGraph(osgUtil::StateGraph* rg) { _stateGraph = rg; }
299  osgUtil::StateGraph* getStateGraph() { return _stateGraph.get(); }
300  const osgUtil::StateGraph* getStateGraph() const { return _stateGraph.get(); }
301 
302  void setStateGraphLeft(osgUtil::StateGraph* rg) { _stateGraphLeft = rg; }
303  osgUtil::StateGraph* getStateGraphLeft() { return _stateGraphLeft.get(); }
304  const osgUtil::StateGraph* getStateGraphLeft() const { return _stateGraphLeft.get(); }
305 
306  void setStateGraphRight(osgUtil::StateGraph* rg) { _stateGraphRight = rg; }
307  osgUtil::StateGraph* getStateGraphRight() { return _stateGraphRight.get(); }
308  const osgUtil::StateGraph* getStateGraphRight() const { return _stateGraphRight.get(); }
309 
310 
311  void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; }
312  osgUtil::RenderStage* getRenderStage() { return _renderStage.get(); }
313  const osgUtil::RenderStage* getRenderStage() const { return _renderStage.get(); }
314 
315  void setRenderStageLeft(osgUtil::RenderStage* rs) { _renderStageLeft = rs; }
316  osgUtil::RenderStage* getRenderStageLeft() { return _renderStageLeft.get(); }
317  const osgUtil::RenderStage* getRenderStageLeft() const { return _renderStageLeft.get(); }
318 
319  void setRenderStageRight(osgUtil::RenderStage* rs) { _renderStageRight = rs; }
320  osgUtil::RenderStage* getRenderStageRight() { return _renderStageRight.get(); }
321  const osgUtil::RenderStage* getRenderStageRight() const { return _renderStageRight.get(); }
322 
324  void collateReferencesToDependentCameras();
325 
327  void clearReferencesToDependentCameras();
328 
329 
331  void setDrawBufferValue( GLenum drawBufferValue ) { _camera->setDrawBuffer(drawBufferValue); }
332 
334  GLenum getDrawBufferValue() const { return _camera->getDrawBuffer(); }
335 
336 
339  {
343  PROPORTIONAL_TO_SCREEN_DISTANCE
344  };
345 
347  void setFusionDistance(FusionDistanceMode mode,float value=1.0f)
348  {
349  _fusionDistanceMode = mode;
350  _fusionDistanceValue = value;
351  }
352 
354  FusionDistanceMode getFusionDistanceMode() const { return _fusionDistanceMode; }
355 
357  float getFusionDistanceValue() const { return _fusionDistanceValue; }
358 
359 
361  void setPrioritizeTextures(bool pt) { _prioritizeTextures = pt; }
362 
364  bool getPrioritizeTextures() const { return _prioritizeTextures; }
365 
368  {
369  virtual osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& projection) const = 0;
370  virtual osg::Matrixd computeLeftEyeView(const osg::Matrixd& view) const = 0;
371 
372  virtual osg::Matrixd computeRightEyeProjection(const osg::Matrixd& projection) const = 0;
373  virtual osg::Matrixd computeRightEyeView(const osg::Matrixd& view) const = 0;
374  };
375 
376  void setComputeStereoMatricesCallback(ComputeStereoMatricesCallback* callback) { _computeStereoMatricesCallback=callback; }
377  ComputeStereoMatricesCallback* getComputeStereoMatricesCallback() { return _computeStereoMatricesCallback.get(); }
378  const ComputeStereoMatricesCallback* getComputeStereoMatricesCallback() const { return _computeStereoMatricesCallback.get(); }
379 
386  bool projectWindowIntoObject(const osg::Vec3& window,osg::Vec3& object) const;
387 
394  bool projectWindowXYIntoObject(int x,int y,osg::Vec3& near_point,osg::Vec3& far_point) const;
395 
404  bool projectObjectIntoWindow(const osg::Vec3& object,osg::Vec3& window) const;
405 
406 
408  inline void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; }
409 
411  inline const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); }
412 
413 
414  inline osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& projection) const
415  {
416  if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeProjection(projection);
417  else return computeLeftEyeProjectionImplementation(projection);
418  }
419 
420  inline osg::Matrixd computeLeftEyeView(const osg::Matrixd& view) const
421  {
422  if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeView(view);
423  else return computeLeftEyeViewImplementation(view);
424  }
425 
426  inline osg::Matrixd computeRightEyeProjection(const osg::Matrixd& projection) const
427  {
428  if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeProjection(projection);
429  else return computeRightEyeProjectionImplementation(projection);
430  }
431 
433  {
434  if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeView(view);
435  else return computeRightEyeViewImplementation(view);
436  }
437 
439  virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd& projection) const;
440 
442  virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd& view) const;
443 
445  virtual osg::Matrixd computeRightEyeProjectionImplementation(const osg::Matrixd& projection) const;
446 
448  virtual osg::Matrixd computeRightEyeViewImplementation(const osg::Matrixd& view) const;
449 
450 
452  virtual void inheritCullSettings(const osg::CullSettings& settings) { inheritCullSettings(settings, _inheritanceMask); }
453 
455  virtual void inheritCullSettings(const osg::CullSettings& settings, unsigned int inheritanceMask);
456 
457 
465  virtual void init();
466 
468  virtual void update();
469 
471  virtual void cull();
472 
474  virtual void draw();
475 
477  unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; }
478 
482  virtual void releaseAllGLObjects();
483 
485  virtual void flushAllDeletedGLObjects();
486 
488  virtual void flushDeletedGLObjects(double& availableTime);
489 
491  bool getStats(Statistics& primStats);
492 
494  void setAutomaticFlush(bool automaticFlush) { _automaticFlush = automaticFlush; }
495  bool getAutomaticFlush() const { return _automaticFlush; }
496 
497  void setResetColorMaskToAllOn(bool enable) { _resetColorMaskToAllEnabled = enable; }
498  bool getResetColorMaskToAllOn() const { return _resetColorMaskToAllEnabled; }
499 
500  protected:
501 
502  virtual ~SceneView();
503 
505  virtual bool cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage, osg::Viewport *viewport);
506 
507  void computeLeftEyeViewport(const osg::Viewport *viewport);
508  void computeRightEyeViewport(const osg::Viewport *viewport);
509 
510  const osg::Matrix computeMVPW() const;
511 
512  void clearArea(int x,int y,int width,int height,const osg::Vec4& color);
513 
516 
523 
525 
530 
535 
537 
539 
542 
546 
548 
551 
552  LightingMode _lightingMode;
553 
555 
558 
562 
566 
567  unsigned int _dynamicObjectCount;
568 
570 };
571 
572 }
573 
574 #endif
575 
osgUtil::StateGraph * getStateGraphLeft()
Definition: SceneView.h:303
const osg::Matrixd & getProjectionMatrix() const
Definition: SceneView.h:227
const osg::CollectOccludersVisitor * getCollectOccludersVisitor() const
Definition: SceneView.h:295
osg::ref_ptr< osg::Light > _light
Definition: SceneView.h:544
ComputeStereoMatricesCallback * getComputeStereoMatricesCallback()
Definition: SceneView.h:377
osg::ref_ptr< osg::NodeVisitor > _updateVisitor
Definition: SceneView.h:519
void setStateGraph(osgUtil::StateGraph *rg)
Definition: SceneView.h:298
#define NULL
Definition: Export.h:59
virtual void inheritCullSettings(const osg::CullSettings &settings)
Definition: SceneView.h:452
GLenum getDrawBufferValue() const
Definition: SceneView.h:334
osg::ref_ptr< osgUtil::RenderStage > _renderStageLeft
Definition: SceneView.h:528
osg::ref_ptr< osg::DisplaySettings > _displaySettings
Definition: SceneView.h:545
osg::ref_ptr< osg::NodeVisitor > _initVisitor
Definition: SceneView.h:518
void setActiveUniforms(int activeUniforms)
Definition: SceneView.h:167
const osgUtil::CullVisitor * getCullVisitorLeft() const
Definition: SceneView.h:287
osg::observer_ptr< osg::Camera > _camera
Definition: SceneView.h:540
void setViewport(osg::Viewport *viewport)
Definition: SceneView.h:98
void setCullVisitorRight(osgUtil::CullVisitor *cv)
Definition: SceneView.h:289
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitor
Definition: SceneView.h:520
FusionDistanceMode getFusionDistanceMode() const
Definition: SceneView.h:354
osg::RenderInfo & getRenderInfo()
Definition: SceneView.h:193
void setInitVisitor(osg::NodeVisitor *av)
Definition: SceneView.h:271
float _fusionDistanceValue
Definition: SceneView.h:550
osg::ref_ptr< osgUtil::RenderStage > _renderStageRight
Definition: SceneView.h:533
void setSecondaryStateSet(osg::StateSet *state)
Definition: SceneView.h:139
const osg::Matrixd & getViewMatrix() const
Definition: SceneView.h:263
const osg::FrameStamp * getFrameStamp() const
Definition: SceneView.h:411
void setCollectOccludersVisitor(osg::CollectOccludersVisitor *cov)
Definition: SceneView.h:293
osg::NodeVisitor * getUpdateVisitor()
Definition: SceneView.h:277
const osg::NodeVisitor * getUpdateVisitor() const
Definition: SceneView.h:278
osg::NodeVisitor * getInitVisitor()
Definition: SceneView.h:272
void setState(osg::State *state)
Definition: SceneView.h:184
const osg::Vec4 & getClearColor() const
Definition: SceneView.h:125
osg::ref_ptr< osg::StateSet > _globalStateSet
Definition: SceneView.h:543
osgUtil::StateGraph * getStateGraphRight()
Definition: SceneView.h:307
void setPrioritizeTextures(bool pt)
Definition: SceneView.h:361
const osg::Camera * getCamera() const
Definition: SceneView.h:77
unsigned int _dynamicObjectCount
Definition: SceneView.h:567
bool _redrawInterlacedStereoStencilMask
Definition: SceneView.h:563
void setFusionDistance(FusionDistanceMode mode, float value=1.0f)
Definition: SceneView.h:347
osgUtil::RenderStage * getRenderStage()
Definition: SceneView.h:312
OSG_EXPORT void flushDeletedGLObjects(unsigned int contextID, double currentTime, double &availableTime)
void setCullVisitorLeft(osgUtil::CullVisitor *cv)
Definition: SceneView.h:285
void setDrawBufferValue(GLenum drawBufferValue)
Definition: SceneView.h:331
const osgUtil::CullVisitor * getCullVisitor() const
Definition: SceneView.h:283
osg::Matrixd & getProjectionMatrix()
Definition: SceneView.h:224
const osgUtil::RenderStage * getRenderStageRight() const
Definition: SceneView.h:321
osg::Matrixd computeLeftEyeView(const osg::Matrixd &view) const
Definition: SceneView.h:420
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorLeft
Definition: SceneView.h:526
osgUtil::CullVisitor * getCullVisitor()
Definition: SceneView.h:282
void setLight(osg::Light *light)
Definition: SceneView.h:180
const osg::DisplaySettings * getDisplaySettings() const
Definition: SceneView.h:114
osg::Node * getSceneData(unsigned int childNo=0)
Definition: SceneView.h:87
int _interlacedStereoStencilWidth
Definition: SceneView.h:564
osg::View * getView()
Definition: SceneView.h:189
osgUtil::RenderStage * getRenderStageLeft()
Definition: SceneView.h:316
void setStateGraphLeft(osgUtil::StateGraph *rg)
Definition: SceneView.h:302
void setCullVisitor(osgUtil::CullVisitor *cv)
Definition: SceneView.h:281
OSG_EXPORT void flushAllDeletedGLObjects(unsigned int contextID)
void setProjectionMatrix(const osg::Matrixd &matrix)
Definition: SceneView.h:202
void setLocalStateSet(osg::StateSet *state)
Definition: SceneView.h:143
void setProjectionMatrix(const osg::Matrixf &matrix)
Definition: SceneView.h:199
unsigned int getNumSceneData() const
Definition: SceneView.h:95
osg::ref_ptr< osgUtil::StateGraph > _stateGraph
Definition: SceneView.h:521
osg::ref_ptr< osg::Viewport > _viewportLeft
Definition: SceneView.h:529
#define META_Object(library, name)
Definition: Object.h:42
bool getAutomaticFlush() const
Definition: SceneView.h:495
osgUtil::CullVisitor * getCullVisitorLeft()
Definition: SceneView.h:286
osg::Matrixd & getViewMatrix()
Definition: SceneView.h:260
GLint GLenum GLsizei width
Definition: GLU.h:71
void setDisplaySettings(osg::DisplaySettings *vs)
Definition: SceneView.h:111
void setViewMatrix(const osg::Matrixf &matrix)
Definition: SceneView.h:251
const osg::Light * getLight() const
Definition: SceneView.h:182
const osg::StateSet * getLocalStateSet() const
Definition: SceneView.h:145
const osgUtil::CullVisitor * getCullVisitorRight() const
Definition: SceneView.h:291
bool getRedrawInterlacedStereoStencilMask() const
Definition: SceneView.h:132
double _previousSimulationTime
Definition: SceneView.h:561
osg::ref_ptr< osg::Viewport > _viewportRight
Definition: SceneView.h:534
bool getResetColorMaskToAllOn() const
Definition: SceneView.h:498
osg::StateSet * getLocalStateSet()
Definition: SceneView.h:144
FusionDistanceMode _fusionDistanceMode
Definition: SceneView.h:549
void setViewMatrix(const osg::Matrixd &matrix)
Definition: SceneView.h:254
const osgUtil::RenderStage * getRenderStageLeft() const
Definition: SceneView.h:317
const osg::Viewport * getViewport() const
Definition: SceneView.h:108
void setRenderStageLeft(osgUtil::RenderStage *rs)
Definition: SceneView.h:315
osg::StateSet * getGlobalStateSet()
Definition: SceneView.h:136
void setStateGraphRight(osgUtil::StateGraph *rg)
Definition: SceneView.h:306
int _interlacedStereoStencilHeight
Definition: SceneView.h:565
void setClearColor(const osg::Vec4 &color)
Definition: SceneView.h:122
bool _resetColorMaskToAllEnabled
Definition: SceneView.h:569
osg::DisplaySettings * getDisplaySettings()
Definition: SceneView.h:117
osg::Viewport * getViewport()
Definition: SceneView.h:105
osg::StateSet * getSecondaryStateSet()
Definition: SceneView.h:140
GLint GLenum GLsizei GLsizei height
Definition: GLU.h:71
bool _prioritizeTextures
Definition: SceneView.h:554
void setRedrawInterlacedStereoStencilMask(bool flag)
Definition: SceneView.h:129
unsigned int getDynamicObjectCount() const
Definition: SceneView.h:477
void setViewport(int x, int y, int width, int height)
Definition: SceneView.h:101
osg::Camera * getCamera()
Definition: SceneView.h:74
int getActiveUniforms() const
Definition: SceneView.h:170
double _previousFrameTime
Definition: SceneView.h:560
float getFusionDistanceValue() const
Definition: SceneView.h:357
const osg::Node * getSceneData(unsigned int childNo=0) const
Definition: SceneView.h:92
osgUtil::CullVisitor * getCullVisitorRight()
Definition: SceneView.h:290
osg::ref_ptr< osg::Camera > _cameraWithOwnership
Definition: SceneView.h:541
osg::State * getState()
Definition: SceneView.h:185
osg::ref_ptr< osg::FrameStamp > _frameStamp
Definition: SceneView.h:538
Definition: Node.h:71
osg::Light * getLight()
Definition: SceneView.h:181
bool getPrioritizeTextures() const
Definition: SceneView.h:364
void setUpdateVisitor(osg::NodeVisitor *av)
Definition: SceneView.h:276
const osg::NodeVisitor * getInitVisitor() const
Definition: SceneView.h:273
osg::ref_ptr< osgUtil::StateGraph > _stateGraphRight
Definition: SceneView.h:532
osg::RenderInfo _renderInfo
Definition: SceneView.h:515
#define OSGUTIL_EXPORT
Definition: Export.h:40
osg::ref_ptr< ComputeStereoMatricesCallback > _computeStereoMatricesCallback
Definition: SceneView.h:524
void setRenderStage(osgUtil::RenderStage *rs)
Definition: SceneView.h:311
osg::ref_ptr< osgUtil::StateGraph > _stateGraphLeft
Definition: SceneView.h:527
LightingMode getLightingMode() const
Definition: SceneView.h:178
const osg::StateSet * getSecondaryStateSet() const
Definition: SceneView.h:141
const osgUtil::RenderStage * getRenderStage() const
Definition: SceneView.h:313
osg::Matrixd computeRightEyeProjection(const osg::Matrixd &projection) const
Definition: SceneView.h:426
const osg::View * getView() const
Definition: SceneView.h:190
LightingMode _lightingMode
Definition: SceneView.h:552
osgUtil::StateGraph * getStateGraph()
Definition: SceneView.h:299
osg::ref_ptr< osgUtil::RenderStage > _renderStage
Definition: SceneView.h:522
const osgUtil::StateGraph * getStateGraphLeft() const
Definition: SceneView.h:304
void setAutomaticFlush(bool automaticFlush)
Definition: SceneView.h:494
osg::ref_ptr< osg::StateSet > _localStateSet
Definition: SceneView.h:514
void setRenderInfo(osg::RenderInfo &renderInfo)
Definition: SceneView.h:192
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorRight
Definition: SceneView.h:531
virtual void setDefaults()
Definition: SceneView.h:63
osg::ref_ptr< osg::CollectOccludersVisitor > _collectOccludersVisitor
Definition: SceneView.h:536
void setView(osg::View *view)
Definition: SceneView.h:188
osg::ref_ptr< osg::StateSet > _secondaryStateSet
Definition: SceneView.h:547
const osg::StateSet * getGlobalStateSet() const
Definition: SceneView.h:137
osgUtil::RenderStage * getRenderStageRight()
Definition: SceneView.h:320
void setFrameStamp(osg::FrameStamp *fs)
Definition: SceneView.h:408
osg::Matrixd computeRightEyeView(const osg::Matrixd &view) const
Definition: SceneView.h:432
Definition: View.h:29
void setGlobalStateSet(osg::StateSet *state)
Definition: SceneView.h:135
void setComputeStereoMatricesCallback(ComputeStereoMatricesCallback *callback)
Definition: SceneView.h:376
const osgUtil::StateGraph * getStateGraphRight() const
Definition: SceneView.h:308
const osgUtil::StateGraph * getStateGraph() const
Definition: SceneView.h:300
void setResetColorMaskToAllOn(bool enable)
Definition: SceneView.h:497
osg::CollectOccludersVisitor * getCollectOccludersVisitor()
Definition: SceneView.h:294
const osg::RenderInfo & getRenderInfo() const
Definition: SceneView.h:194
Shader generator framework.
Definition: RenderInfo.h:20
const osg::State * getState() const
Definition: SceneView.h:186
const ComputeStereoMatricesCallback * getComputeStereoMatricesCallback() const
Definition: SceneView.h:378
void setRenderStageRight(osgUtil::RenderStage *rs)
Definition: SceneView.h:319
osg::Matrixd computeLeftEyeProjection(const osg::Matrixd &projection) const
Definition: SceneView.h:414
Options LightingMode
Definition: SceneView.h:175