openscenegraph
SceneView
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>
23#include <osg/CullSettings>
24#include <osg/Camera>
25
26#include <osgUtil/CullVisitor>
27
28namespace osgUtil {
29
37{
38 public:
39
42
43 SceneView(const SceneView& sceneview, const osg::CopyOp& copyop = osg::CopyOp());
44
46
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
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
173
174
176
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
325
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 osg::FrameStamp* getFrameStamp() { return _frameStamp.get(); }
412
414 inline const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); }
415
416
417 inline osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& projection) const
418 {
419 if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeProjection(projection);
420 else return computeLeftEyeProjectionImplementation(projection);
421 }
422
424 {
425 if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeLeftEyeView(view);
426 else return computeLeftEyeViewImplementation(view);
427 }
428
430 {
431 if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeProjection(projection);
432 else return computeRightEyeProjectionImplementation(projection);
433 }
434
436 {
437 if (_computeStereoMatricesCallback.valid()) return _computeStereoMatricesCallback->computeRightEyeView(view);
438 else return computeRightEyeViewImplementation(view);
439 }
440
443
446
449
452
453
455 virtual void inheritCullSettings(const osg::CullSettings& settings) { inheritCullSettings(settings, _inheritanceMask); }
456
458 virtual void inheritCullSettings(const osg::CullSettings& settings, unsigned int inheritanceMask);
459
460
468 virtual void init();
469
471 virtual void update();
472
474 virtual void cull();
475
477 virtual void draw();
478
480 unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; }
481
485 virtual void releaseAllGLObjects();
486
487 virtual void resizeGLObjectBuffers(unsigned int maxSize);
488 virtual void releaseGLObjects(osg::State* = 0) const;
489
492
494 virtual void flushDeletedGLObjects(double& availableTime);
495
497 bool getStats(Statistics& primStats);
498
500 void setAutomaticFlush(bool automaticFlush) { _automaticFlush = automaticFlush; }
501 bool getAutomaticFlush() const { return _automaticFlush; }
502
503 void setResetColorMaskToAllOn(bool enable) { _resetColorMaskToAllEnabled = enable; }
504 bool getResetColorMaskToAllOn() const { return _resetColorMaskToAllEnabled; }
505
506 protected:
507
508 virtual ~SceneView();
509
511 virtual bool cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage, osg::Viewport *viewport);
512
515
517
518 void clearArea(int x,int y,int width,int height,const osg::Vec4& color);
519
522
529
531
536
541
543
545
548
552
554
557
559
561
564
568
572
574
576};
577
578}
579
580#endif
581
Definition CullVisitor:49
Definition RenderStage:38
Definition SceneView:37
osg::Matrixd computeRightEyeView(const osg::Matrixd &view) const
Definition SceneView:435
void setFrameStamp(osg::FrameStamp *fs)
Definition SceneView:408
void setFusionDistance(FusionDistanceMode mode, float value=1.0f)
Definition SceneView:347
osg::ref_ptr< osg::NodeVisitor > _updateVisitor
Definition SceneView:525
void setLight(osg::Light *light)
Definition SceneView:180
virtual void setDefaults()
Definition SceneView:63
double _previousFrameTime
Definition SceneView:566
virtual void inheritCullSettings(const osg::CullSettings &settings)
Definition SceneView:455
osgUtil::StateGraph * getStateGraphLeft()
Definition SceneView:303
void setPrioritizeTextures(bool pt)
Definition SceneView:361
osg::NodeVisitor * getUpdateVisitor()
Definition SceneView:277
osg::DisplaySettings * getDisplaySettings()
Definition SceneView:117
void setComputeStereoMatricesCallback(ComputeStereoMatricesCallback *callback)
Definition SceneView:376
unsigned int _dynamicObjectCount
Definition SceneView:573
osg::Camera * getCamera()
Definition SceneView:74
void setProjectionMatrixAsOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
const osgUtil::CullVisitor * getCullVisitorRight() const
Definition SceneView:291
void setViewMatrix(const osg::Matrixf &matrix)
Definition SceneView:251
const osg::View * getView() const
Definition SceneView:190
void setRenderStage(osgUtil::RenderStage *rs)
Definition SceneView:311
osg::ref_ptr< osgUtil::StateGraph > _stateGraphRight
Definition SceneView:538
bool getPrioritizeTextures() const
Definition SceneView:364
void computeRightEyeViewport(const osg::Viewport *viewport)
LightingMode _lightingMode
Definition SceneView:558
osg::Viewport * getViewport()
Definition SceneView:105
unsigned int getNumSceneData() const
Definition SceneView:95
void setClearColor(const osg::Vec4 &color)
Definition SceneView:122
FusionDistanceMode _fusionDistanceMode
Definition SceneView:555
const osg::FrameStamp * getFrameStamp() const
Definition SceneView:414
const osg::Light * getLight() const
Definition SceneView:182
void setDrawBufferValue(GLenum drawBufferValue)
Definition SceneView:331
virtual void releaseGLObjects(osg::State *=0) const
osg::ref_ptr< osgUtil::StateGraph > _stateGraphLeft
Definition SceneView:533
void getViewMatrixAsLookAt(osg::Vec3 &eye, osg::Vec3 &center, osg::Vec3 &up, float lookDistance=1.0f) const
const osg::Matrixd & getProjectionMatrix() const
Definition SceneView:227
int _interlacedStereoStencilWidth
Definition SceneView:570
bool getProjectionMatrixAsPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
osg::RenderInfo _renderInfo
Definition SceneView:521
const ComputeStereoMatricesCallback * getComputeStereoMatricesCallback() const
Definition SceneView:378
const osg::NodeVisitor * getUpdateVisitor() const
Definition SceneView:278
osg::ref_ptr< osg::StateSet > _secondaryStateSet
Definition SceneView:553
osg::ref_ptr< osgUtil::StateGraph > _stateGraph
Definition SceneView:527
float _fusionDistanceValue
Definition SceneView:556
void setActiveUniforms(int activeUniforms)
Definition SceneView:167
void setStateGraphLeft(osgUtil::StateGraph *rg)
Definition SceneView:302
const osg::CollectOccludersVisitor * getCollectOccludersVisitor() const
Definition SceneView:295
const osgUtil::StateGraph * getStateGraph() const
Definition SceneView:300
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorRight
Definition SceneView:537
const osg::Matrix computeMVPW() const
osg::ref_ptr< osgUtil::RenderStage > _renderStageRight
Definition SceneView:539
osg::Matrixd computeRightEyeProjection(const osg::Matrixd &projection) const
Definition SceneView:429
void setProjectionMatrix(const osg::Matrixd &matrix)
Definition SceneView:202
osg::ref_ptr< osg::FrameStamp > _frameStamp
Definition SceneView:544
osg::StateSet * getSecondaryStateSet()
Definition SceneView:140
osgUtil::CullVisitor * getCullVisitor()
Definition SceneView:282
void setViewport(int x, int y, int width, int height)
Definition SceneView:101
virtual void update()
osg::Matrixd & getProjectionMatrix()
Definition SceneView:224
void setRenderInfo(osg::RenderInfo &renderInfo)
Definition SceneView:192
const osgUtil::StateGraph * getStateGraphRight() const
Definition SceneView:308
bool _requiresFlush
Definition SceneView:563
virtual void setDefaults(unsigned int options)
void setView(osg::View *view)
Definition SceneView:188
osgUtil::StateGraph * getStateGraphRight()
Definition SceneView:307
virtual osg::Matrixd computeRightEyeProjectionImplementation(const osg::Matrixd &projection) const
void setRedrawInterlacedStereoStencilMask(bool flag)
Definition SceneView:129
void setResetColorMaskToAllOn(bool enable)
Definition SceneView:503
const osgUtil::CullVisitor * getCullVisitor() const
Definition SceneView:283
SceneView(osg::DisplaySettings *ds=NULL)
void setCollectOccludersVisitor(osg::CollectOccludersVisitor *cov)
Definition SceneView:293
osg::NodeVisitor * getInitVisitor()
Definition SceneView:272
bool getAutomaticFlush() const
Definition SceneView:501
int getActiveUniforms() const
Definition SceneView:170
void setStateGraphRight(osgUtil::StateGraph *rg)
Definition SceneView:306
virtual void resizeGLObjectBuffers(unsigned int maxSize)
virtual void draw()
const osgUtil::RenderStage * getRenderStage() const
Definition SceneView:313
void setUpdateVisitor(osg::NodeVisitor *av)
Definition SceneView:276
void setLocalStateSet(osg::StateSet *state)
Definition SceneView:143
void collateReferencesToDependentCameras()
bool getProjectionMatrixAsOrtho(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
void setCullVisitorRight(osgUtil::CullVisitor *cv)
Definition SceneView:289
virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd &view) const
const osgUtil::CullVisitor * getCullVisitorLeft() const
Definition SceneView:287
osgUtil::CullVisitor * getCullVisitorLeft()
Definition SceneView:286
float getFusionDistanceValue() const
Definition SceneView:357
ActiveUniforms
Definition SceneView:148
bool _initCalled
Definition SceneView:523
const osgUtil::RenderStage * getRenderStageLeft() const
Definition SceneView:317
void setCullVisitorLeft(osgUtil::CullVisitor *cv)
Definition SceneView:285
const osg::RenderInfo & getRenderInfo() const
Definition SceneView:194
osg::StateSet * getLocalStateSet()
Definition SceneView:144
osg::View * getView()
Definition SceneView:189
void setSceneData(osg::Node *node)
bool getRedrawInterlacedStereoStencilMask() const
Definition SceneView:132
void setViewport(osg::Viewport *viewport)
Definition SceneView:98
osg::ref_ptr< osg::StateSet > _globalStateSet
Definition SceneView:549
const osg::StateSet * getGlobalStateSet() const
Definition SceneView:137
osg::ref_ptr< osg::DisplaySettings > _displaySettings
Definition SceneView:551
void setProjectionMatrixAsPerspective(double fovy, double aspectRatio, double zNear, double zFar)
const osg::Matrixd & getViewMatrix() const
Definition SceneView:263
osg::State * getState()
Definition SceneView:185
LightingMode getLightingMode() const
Definition SceneView:178
void setState(osg::State *state)
Definition SceneView:184
void setViewMatrix(const osg::Matrixd &matrix)
Definition SceneView:254
bool _redrawInterlacedStereoStencilMask
Definition SceneView:569
bool _resetColorMaskToAllEnabled
Definition SceneView:575
void setProjectionMatrixAsFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
const osg::StateSet * getLocalStateSet() const
Definition SceneView:145
void setCamera(osg::Camera *camera, bool assumeOwnershipOfCamera=true)
bool projectObjectIntoWindow(const osg::Vec3 &object, osg::Vec3 &window) const
virtual void inheritCullSettings(const osg::CullSettings &settings, unsigned int inheritanceMask)
osg::ref_ptr< osgUtil::RenderStage > _renderStageLeft
Definition SceneView:534
const osg::Viewport * getViewport() const
Definition SceneView:108
osg::ref_ptr< osg::CollectOccludersVisitor > _collectOccludersVisitor
Definition SceneView:542
const osgUtil::RenderStage * getRenderStageRight() const
Definition SceneView:321
SceneView(const SceneView &sceneview, const osg::CopyOp &copyop=osg::CopyOp())
virtual osg::Matrixd computeRightEyeViewImplementation(const osg::Matrixd &view) const
void clearReferencesToDependentCameras()
osg::ref_ptr< osg::Viewport > _viewportLeft
Definition SceneView:535
virtual void cull()
osg::ref_ptr< osg::Camera > _cameraWithOwnership
Definition SceneView:547
double _previousSimulationTime
Definition SceneView:567
virtual bool cullStage(const osg::Matrixd &projection, const osg::Matrixd &modelview, osgUtil::CullVisitor *cullVisitor, osgUtil::StateGraph *rendergraph, osgUtil::RenderStage *renderStage, osg::Viewport *viewport)
bool _automaticFlush
Definition SceneView:562
void setRenderStageRight(osgUtil::RenderStage *rs)
Definition SceneView:319
virtual void flushAllDeletedGLObjects()
const osg::NodeVisitor * getInitVisitor() const
Definition SceneView:273
osg::Matrixd computeLeftEyeView(const osg::Matrixd &view) const
Definition SceneView:423
const osgUtil::StateGraph * getStateGraphLeft() const
Definition SceneView:304
Options LightingMode
Definition SceneView:175
osgUtil::RenderStage * getRenderStageLeft()
Definition SceneView:316
void setDisplaySettings(osg::DisplaySettings *vs)
Definition SceneView:111
osg::Node * getSceneData(unsigned int childNo=0)
Definition SceneView:87
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitor
Definition SceneView:526
osg::Matrixd & getViewMatrix()
Definition SceneView:260
osg::ref_ptr< osg::Light > _light
Definition SceneView:550
virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd &projection) const
FusionDistanceMode
Definition SceneView:339
@ USE_FUSION_DISTANCE_VALUE
Definition SceneView:341
osgUtil::StateGraph * getStateGraph()
Definition SceneView:299
unsigned int getDynamicObjectCount() const
Definition SceneView:480
void setStateGraph(osgUtil::StateGraph *rg)
Definition SceneView:298
void setCullVisitor(osgUtil::CullVisitor *cv)
Definition SceneView:281
const osg::State * getState() const
Definition SceneView:186
osg::RenderInfo & getRenderInfo()
Definition SceneView:193
bool getProjectionMatrixAsFrustum(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
osg::ref_ptr< osg::StateSet > _localStateSet
Definition SceneView:520
void clearArea(int x, int y, int width, int height, const osg::Vec4 &color)
bool _prioritizeTextures
Definition SceneView:560
osg::ref_ptr< osgUtil::RenderStage > _renderStage
Definition SceneView:528
virtual void releaseAllGLObjects()
bool getStats(Statistics &primStats)
osg::ref_ptr< osg::Viewport > _viewportRight
Definition SceneView:540
void setSecondaryStateSet(osg::StateSet *state)
Definition SceneView:139
Options
Definition SceneView:48
osg::Matrixd computeLeftEyeProjection(const osg::Matrixd &projection) const
Definition SceneView:417
const osg::StateSet * getSecondaryStateSet() const
Definition SceneView:141
osg::StateSet * getGlobalStateSet()
Definition SceneView:136
osgUtil::RenderStage * getRenderStage()
Definition SceneView:312
void setProjectionMatrixAsOrtho2D(double left, double right, double bottom, double top)
osg::ref_ptr< osgUtil::CullVisitor > _cullVisitorLeft
Definition SceneView:532
osg::ref_ptr< osg::NodeVisitor > _initVisitor
Definition SceneView:524
ComputeStereoMatricesCallback * getComputeStereoMatricesCallback()
Definition SceneView:377
osgUtil::CullVisitor * getCullVisitorRight()
Definition SceneView:290
GLenum getDrawBufferValue() const
Definition SceneView:334
virtual ~SceneView()
void setLightingMode(LightingMode mode)
osg::ref_ptr< ComputeStereoMatricesCallback > _computeStereoMatricesCallback
Definition SceneView:530
virtual void flushDeletedGLObjects(double &availableTime)
const osg::Camera * getCamera() const
Definition SceneView:77
const osg::Vec4 & getClearColor() const
Definition SceneView:125
void setGlobalStateSet(osg::StateSet *state)
Definition SceneView:135
FusionDistanceMode getFusionDistanceMode() const
Definition SceneView:354
void setProjectionMatrix(const osg::Matrixf &matrix)
Definition SceneView:199
osg::FrameStamp * getFrameStamp()
Definition SceneView:411
void setRenderStageLeft(osgUtil::RenderStage *rs)
Definition SceneView:315
osg::Light * getLight()
Definition SceneView:181
osg::CollectOccludersVisitor * getCollectOccludersVisitor()
Definition SceneView:294
int _activeUniforms
Definition SceneView:565
bool projectWindowIntoObject(const osg::Vec3 &window, osg::Vec3 &object) const
void setInitVisitor(osg::NodeVisitor *av)
Definition SceneView:271
const osg::DisplaySettings * getDisplaySettings() const
Definition SceneView:114
bool getResetColorMaskToAllOn() const
Definition SceneView:504
osgUtil::RenderStage * getRenderStageRight()
Definition SceneView:320
bool projectWindowXYIntoObject(int x, int y, osg::Vec3 &near_point, osg::Vec3 &far_point) const
void computeLeftEyeViewport(const osg::Viewport *viewport)
int _interlacedStereoStencilHeight
Definition SceneView:571
void setViewMatrixAsLookAt(const osg::Vec3 &eye, const osg::Vec3 &center, const osg::Vec3 &up)
virtual void init()
osg::observer_ptr< osg::Camera > _camera
Definition SceneView:546
void setAutomaticFlush(bool automaticFlush)
Definition SceneView:500
const osg::Node * getSceneData(unsigned int childNo=0) const
Definition SceneView:92
META_Object(osgUtil, SceneView)
Definition StateGraph:42
Definition Statistics:48
Definition Camera:45
Definition CollectOccludersVisitor:25
Definition CopyOp:41
Definition CullSettings:28
Definition DisplaySettings:34
Definition FrameStamp:35
Definition Light:40
Definition Matrixd:27
Definition Matrixf:27
Definition NodeVisitor:82
Definition Node:72
Definition Object:61
Definition Referenced:44
Definition RenderInfo:28
Definition StateSet:46
Definition State:80
Definition Vec3f:29
Definition Vec4f:28
Definition osg/View:30
Definition Viewport:24
Definition observer_ptr:39
Definition ref_ptr:32
Shader generator framework.
Definition NodeVisitor:25
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40
#define NULL
Definition osg/Export:55
virtual osg::Matrixd computeRightEyeProjection(const osg::Matrixd &projection) const =0
virtual osg::Matrixd computeLeftEyeProjection(const osg::Matrixd &projection) const =0
virtual osg::Matrixd computeLeftEyeView(const osg::Matrixd &view) const =0
virtual osg::Matrixd computeRightEyeView(const osg::Matrixd &view) const =0