27 #include <osg/ref_ptr> 28 #include <osg/Referenced> 30 #include <osg/Texture2D> 50 osg::ref_ptr<osg::Texture2D> _rightColorTex, _rightDepthTex;
51 osg::ref_ptr<osg::Texture2D> _leftColorTex, _leftDepthTex;
55 osg::ref_ptr<osg::Camera> _rightTexCamera, _leftTexCamera;
64 class OF_EXPORT
VRCamera :
public osg::Referenced
77 bool getUseMSAA() {
return _useMSAA; }
80 void setClearMask(GLbitfield mask);
81 GLbitfield getClearMask() {
return _rightCamera->getClearMask(); }
84 unsigned int getNumCameras();
87 osg::Camera* getCamera(
unsigned int pos);
90 void disableCameras();
93 void updateCameras(osg::Matrixd& rightProj,
94 osg::Matrixd& leftProj, osg::Matrixd& centerProj,
const double &zNear);
97 void addSlaveCamerasToView(osg::View *view,
bool useMastersSceneData);
111 osg::observer_ptr<OpenVRDevice> _ovrDevice;
130 virtual std::string getCameraName(
unsigned int camNum);
132 virtual void enableCamera(
unsigned int camNum,
133 osg::Camera* mainCam,
134 const double &zNear,
const double &zFar);
135 virtual void disableCameras(
unsigned int start);
136 virtual void reset();
137 virtual double getMinZNear();
139 typedef std::vector< osg::ref_ptr<VRCamera> > VRCameraList;
140 VRCameraList _vrCameraList;
143 osg::observer_ptr<VRTextureBuffer> _texBuffer;
145 osg::observer_ptr<OpenVRDevice> _ovrDevice;
150 #endif // !define _OF_VRUTILS_
Encapsulates textures used for VR offscreen rendering.
Definition: VRUtils.hpp:42
osg::ref_ptr< osg::Camera > _rightCamera
Definition: VRUtils.hpp:103
Represents data needed to use an OpenVR-supported HMD.
Definition: OpenVRDevice.hpp:87
Definition: CoordinateAxes.hpp:29
Definition: DepthPartitioner.hpp:95
osg::observer_ptr< VRTextureBuffer > _texBuffer
Definition: VRUtils.hpp:109
bool _useMSAA
Definition: VRUtils.hpp:116
Encapsulates cameras used for VR stereo rendering.
Definition: VRUtils.hpp:64
osg::ref_ptr< osg::Camera > _monoCamera
Definition: VRUtils.hpp:106
Creates and manages VR cameras for the depth partitioner.
Definition: VRUtils.hpp:125