21 #ifndef _OF_RENDERRECTANGLE_ 22 #define _OF_RENDERRECTANGLE_ 32 #include <osg/Referenced> 33 #include <osg/ref_ptr> 34 #include <osgViewer/View> 53 typedef std::vector<osg::ref_ptr<View> > ViewList;
61 inline FrameManager* getFrameManager()
const {
return _frameManager.get(); }
67 osg::Group*
getHUD()
const {
return _hudCamera.get(); }
70 void setGraphicsContext(osg::GraphicsContext *gc);
73 void setViewport(
int x,
int y,
int w,
int h);
76 void setSelected(
bool select);
80 void setShowBorder(
bool show);
81 bool getShowBorder() {
return (_borderGeode->getNodeMask() != 0x0); }
84 void setSkySphereTexture(
const std::string& fname);
87 bool setSkySphereStarData(
const std::string& catalogName,
float minMag,
float maxMag,
unsigned int maxNumStars = 100000,
88 float minPixSize = 1.0,
float maxPixSize = 10.0,
float minDimRatio = 0.5f);
94 void setBackgroundColor(
float r,
float g,
float b);
100 void addView(
View *view);
101 void removeView(
View *view);
102 void removeAllViews();
109 void selectView(
View *view);
110 void selectView(
unsigned int newView);
113 View* getCurrentView();
116 void applyCurrentViewProjection();
125 void selectCurrentView();
126 void updateViewProjection(
View *view);
129 osg::ref_ptr<View> _defaultView;
130 unsigned int _currView;
134 osg::ref_ptr<osgViewer::View> _sceneView;
137 osg::ref_ptr<DepthPartitioner> _depthPartitioner;
139 osg::ref_ptr<osg::Group> _scene;
142 osg::ref_ptr<osg::Camera> _hudCamera;
143 osg::ref_ptr<osg::Camera> _backCamera;
144 osg::ref_ptr<osg::Camera> _mirrorCamera;
146 osg::ref_ptr<VRCamera> _backCameraVR;
149 osg::observer_ptr<VRTextureBuffer> _vrTextureBuffer;
152 osg::observer_ptr<OpenVRDevice> _ovrDevice;
155 osg::ref_ptr<osg::Geode> _borderGeode;
156 osg::ref_ptr<SkySphere> _skySphere;
159 osg::ref_ptr<FrameManager> _frameManager;
Extends OpenFrames::Sphere.
Definition: SkySphere.hpp:41
osgViewer::View * getSceneView() const
Definition: RenderRectangle.hpp:64
Encapsulates textures used for VR offscreen rendering.
Definition: VRUtils.hpp:42
Encapsulates a rectangle in which a scene can be rendered.
Definition: RenderRectangle.hpp:50
Represents data needed to use an OpenVR-supported HMD.
Definition: OpenVRDevice.hpp:87
This class allows priority access to a ReferenceFrame heirarchy.
Definition: FrameManager.hpp:52
Definition: CoordinateAxes.hpp:29
void setDepthPartitioningEnabled(bool enable)
Definition: RenderRectangle.hpp:97
osg::Group * getHUD() const
Definition: RenderRectangle.hpp:67
SkySphere * getSkySphere() const
Definition: RenderRectangle.hpp:91
Encapsulates variables needed for a view.
Definition: View.hpp:45