]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/CameraGroup.hxx
Improve timing statistics
[flightgear.git] / src / Main / CameraGroup.hxx
index a9e9b6973481126fdb6f98f828a6f42f9dcb8235..1e18e28e1172702ebd12e8c7c2a826844cc23b1a 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef CAMERAGROUP_HXX
 #define CAMERAGROUP_HXX 1
 
+#include <map>
 #include <string>
 #include <vector>
 
@@ -24,6 +25,7 @@
 #include <osg/ref_ptr>
 #include <osg/Referenced>
 #include <osg/Node>
+#include <osg/TextureRectangle>
 
 // For osgUtil::LineSegmentIntersector::Intersections, which is a typedef.
 #include <osgUtil/LineSegmentIntersector>
@@ -76,6 +78,10 @@ struct CameraInfo : public osg::Referenced
     double height;
 };
 
+/** Update the OSG cameras from the camera info.
+ */
+void updateCameras(const CameraInfo* info);
+
 class CameraGroup : public osg::Referenced
 {
 public:
@@ -174,10 +180,19 @@ public:
     /** Update camera properties after a resize event.
      */
     void resized();
+
+    void buildDistortionCamera(const SGPropertyNode* psNode,
+                               osg::Camera* camera);
 protected:
     CameraList _cameras;
     osg::ref_ptr<osgViewer::Viewer> _viewer;
     static osg::ref_ptr<CameraGroup> _defaultGroup;
+    // Near, far for the master camera if used.
+    float _zNear;
+    float _zFar;
+    float _nearField;
+    typedef std::map<std::string, osg::ref_ptr<osg::TextureRectangle> > TextureMap;
+    TextureMap _textureTargets;
 };
 
 }