Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-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
|
||||
* 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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
SKY_LIGHT = 0x2,
|
||||
COMPILE_GLOBJECTS_AT_INIT = 0x4,
|
||||
STANDARD_SETTINGS = HEADLIGHT |
|
||||
COMPILE_GLOBJECTS_AT_INIT
|
||||
COMPILE_GLOBJECTS_AT_INIT
|
||||
};
|
||||
|
||||
/* Set defaults. */
|
||||
@@ -75,7 +75,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
* an osg::Scene but can be any osg::Node type.
|
||||
*/
|
||||
void setSceneData(osg::Node* node);
|
||||
|
||||
|
||||
/** Get the scene data to view. The data will typically be
|
||||
* an osg::Scene but can be any osg::Node type.
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
* an osg::Scene but can be any osg::Node type.
|
||||
*/
|
||||
const osg::Node* getSceneData(unsigned int childNo=0) const { return (_camera->getNumChildren()>childNo) ? _camera->getChild(childNo) : 0; }
|
||||
|
||||
|
||||
/** Get the number of scene data subgraphs added to the SceneView's camera.*/
|
||||
unsigned int getNumSceneData() const { return _camera->getNumChildren(); }
|
||||
|
||||
@@ -101,10 +101,10 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Get the const viewport. */
|
||||
const osg::Viewport* getViewport() const { return (_camera->getViewport()!=0) ? _camera->getViewport() : 0; }
|
||||
|
||||
|
||||
/** Set the DisplaySettings. */
|
||||
inline void setDisplaySettings(osg::DisplaySettings* vs) { _displaySettings = vs; }
|
||||
|
||||
|
||||
/** Get the const DisplaySettings */
|
||||
inline const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); }
|
||||
|
||||
@@ -118,12 +118,12 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Get the color used in glClearColor.*/
|
||||
const osg::Vec4& getClearColor() const { return _camera->getClearColor(); }
|
||||
|
||||
|
||||
/** Manually set the redraw interlaced stereo stencil mask request flag to control whether to redraw the stencil buffer on the next frame.*/
|
||||
|
||||
|
||||
/** Manually set the redraw interlaced stereo stencil mask request flag to control whether to redraw the stencil buffer on the next frame.*/
|
||||
void setRedrawInterlacedStereoStencilMask(bool flag) { _redrawInterlacedStereoStencilMask = flag; }
|
||||
|
||||
/** Get the redraw interlaced stereo stencil mask request flag.*/
|
||||
/** Get the redraw interlaced stereo stencil mask request flag.*/
|
||||
bool getRedrawInterlacedStereoStencilMask() const { return _redrawInterlacedStereoStencilMask; }
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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,
|
||||
@@ -158,14 +158,14 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
ALL_UNIFORMS = 0x7FFFFFFF
|
||||
};
|
||||
|
||||
/** Set the uniforms that SceneView should set set up on each frame.*/
|
||||
/** Set the uniforms that SceneView should set set up on each frame.*/
|
||||
void setActiveUniforms(int activeUniforms) { _activeUniforms = activeUniforms; }
|
||||
|
||||
/** Get the uniforms that SceneView should set set up on each frame.*/
|
||||
int getActiveUniforms() const { return _activeUniforms; }
|
||||
|
||||
void updateUniforms();
|
||||
|
||||
|
||||
|
||||
typedef Options LightingMode;
|
||||
|
||||
@@ -175,11 +175,11 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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(); }
|
||||
@@ -187,7 +187,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
void setRenderInfo(osg::RenderInfo& renderInfo) { _renderInfo = renderInfo; }
|
||||
osg::RenderInfo& getRenderInfo() { return _renderInfo; }
|
||||
const osg::RenderInfo& getRenderInfo() const { return _renderInfo; }
|
||||
|
||||
|
||||
|
||||
|
||||
/** Set the projection matrix. Can be thought of as setting the lens of a camera. */
|
||||
@@ -221,7 +221,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
/** Get the const projection matrix.*/
|
||||
const osg::Matrixd& getProjectionMatrix() const { return _camera->getProjectionMatrix(); }
|
||||
|
||||
/** Get the orthographic settings of the orthographic projection matrix.
|
||||
/** Get the orthographic settings of the orthographic projection matrix.
|
||||
* Returns false if matrix is not an orthographic matrix, where parameter values are undefined.*/
|
||||
bool getProjectionMatrixAsOrtho(double& left, double& right,
|
||||
double& bottom, double& top,
|
||||
@@ -234,7 +234,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
double& zNear, double& zFar) const;
|
||||
|
||||
/** Get the frustum setting of a symmetric perspective projection matrix.
|
||||
* Returns false if matrix is not a perspective matrix, where parameter values are undefined.
|
||||
* Returns false if matrix is not a perspective matrix, where parameter values are undefined.
|
||||
* Note, if matrix is not a symmetric perspective matrix then the shear will be lost.
|
||||
* Asymmetric matrices occur when stereo, power walls, caves and reality center display are used.
|
||||
* In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.*/
|
||||
@@ -244,7 +244,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates. */
|
||||
inline void setViewMatrix(const osg::Matrixf& matrix) { _camera->setViewMatrix(matrix); }
|
||||
|
||||
|
||||
/** Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates. */
|
||||
inline void setViewMatrix(const osg::Matrixd& matrix) { _camera->setViewMatrix(matrix); }
|
||||
|
||||
@@ -262,7 +262,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void setInitVisitor(osg::NodeVisitor* av) { _initVisitor = av; }
|
||||
osg::NodeVisitor* getInitVisitor() { return _initVisitor.get(); }
|
||||
const osg::NodeVisitor* getInitVisitor() const { return _initVisitor.get(); }
|
||||
@@ -284,7 +284,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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(); }
|
||||
@@ -354,7 +354,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Set whether the draw method should call renderer->prioritizeTexture.*/
|
||||
void setPrioritizeTextures(bool pt) { _prioritizeTextures = pt; }
|
||||
|
||||
|
||||
/** Get whether the draw method should call renderer->prioritizeTexture.*/
|
||||
bool getPrioritizeTextures() const { return _prioritizeTextures; }
|
||||
|
||||
@@ -367,7 +367,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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(); }
|
||||
@@ -419,7 +419,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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);
|
||||
@@ -462,10 +462,10 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Do draw traversal of draw bins generated by cull traversal.*/
|
||||
virtual void draw();
|
||||
|
||||
|
||||
/** Compute the number of dynamic objects that will be held in the rendering backend */
|
||||
unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; }
|
||||
|
||||
|
||||
/** Release all OpenGL objects from the scene graph, such as texture objects, display lists, etc.
|
||||
* These released scene graphs are placed in the respective delete GLObjects cache, and
|
||||
* then need to be deleted in OpenGL by SceneView::flushAllDeleteGLObjects(). */
|
||||
@@ -476,7 +476,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Flush deleted OpenGL objects, such as texture objects, display lists, etc., within the specified available time.*/
|
||||
virtual void flushDeletedGLObjects(double& availableTime);
|
||||
|
||||
|
||||
/** Extract stats for current draw list. */
|
||||
bool getStats(Statistics& primStats);
|
||||
|
||||
@@ -490,7 +490,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
/** Do cull traversal of attached scene graph using Cull NodeVisitor. Return true if computeNearFar has been done during the cull traversal.*/
|
||||
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);
|
||||
|
||||
@@ -500,7 +500,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
|
||||
osg::ref_ptr<osg::StateSet> _localStateSet;
|
||||
osg::RenderInfo _renderInfo;
|
||||
|
||||
|
||||
bool _initCalled;
|
||||
osg::ref_ptr<osg::NodeVisitor> _initVisitor;
|
||||
osg::ref_ptr<osg::NodeVisitor> _updateVisitor;
|
||||
@@ -521,37 +521,37 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
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;
|
||||
|
||||
int _activeUniforms;
|
||||
double _previousFrameTime;
|
||||
double _previousSimulationTime;
|
||||
|
||||
|
||||
bool _redrawInterlacedStereoStencilMask;
|
||||
int _interlacedStereoStencilWidth;
|
||||
int _interlacedStereoStencilHeight;
|
||||
|
||||
unsigned int _dynamicObjectCount;
|
||||
unsigned int _dynamicObjectCount;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user