Preperation for adding stereo support direclty into osgViewer.

This commit is contained in:
Robert Osfield
2013-04-15 14:21:32 +00:00
parent bc288d23dc
commit 34a6b38983
7 changed files with 239 additions and 131 deletions

View File

@@ -406,8 +406,6 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
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);
@@ -432,12 +430,19 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
else return computeRightEyeViewImplementation(view);
}
/** helper function for computing the left eye projection matrix.*/
virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd& projection) const;
/** helper function for computing the left eye view matrix.*/
virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd& view) const;
/** helper function for computing the right eye view matrix.*/
virtual osg::Matrixd computeRightEyeProjectionImplementation(const osg::Matrixd& projection) const;
/** helper function for computing the right eye view matrix.*/
virtual osg::Matrixd computeRightEyeViewImplementation(const osg::Matrixd& view) const;
/** Inherit the local cull settings variable from a specified CullSettings object, according to the inheritance mask.*/
virtual void inheritCullSettings(const osg::CullSettings& settings) { inheritCullSettings(settings, _inheritanceMask); }