diff --git a/include/osg/Camera b/include/osg/Camera index 3e30dce76..e49c8d69f 100644 --- a/include/osg/Camera +++ b/include/osg/Camera @@ -12,6 +12,7 @@ #include #include #include +#include namespace osg { @@ -271,8 +272,15 @@ class SG_EXPORT Camera: public osg::Referenced const Matrix getModelViewMatrix() const; - - + /** Get the camera view frsutm.*/ + inline Polytope getViewFrustum() const + { + Polytope cv; + cv.setToUnitFrustum(); + cv.transformProvidingInverse(getModelViewMatrix()* + getProjectionMatrix()); + return cv; + }