17 #include <matrix/vlVector.h>
19 #include <osg/Matrixd>
20 #include <osg/RenderInfo>
29 #include <Varjo_events.h>
30 #include <Varjo_layers.h>
32 #include <Varjo_world.h>
35 #define VARJO_USE_GAZE 1
40 class DtVirtualRealityChannel;
56 void setEyeCenters(osg::Vec2 leftEye, osg::Vec2 rightEye);
71 virtual void update(osg::State* state)
const;
74 virtual void initProgram(osg::State* state)
const;
84 mutable osg::Vec2 myEyeCenters[2];
135 virtual const std::string& providerName();
138 virtual const std::string& deviceName();
141 virtual bool initializeVR();
144 virtual bool hasFocusViews();
147 virtual bool useVrs();
156 virtual void getProjectionAngles(
vrvVirtualReality::DtEye eye,
double& left,
double& right,
double& bottom,
double& top,
double znear,
double zfar);
168 virtual void setHmdPoseOffset(
const DtVector& pos,
const DtQuat& ori);
171 virtual bool getTrackedPose(
DtVector& pos,
DtQuat& ori,
int index);
174 virtual const std::unordered_map<int64_t, DtTrackedMarker>& getTrackedMarkers()
const;
177 virtual bool reset();
180 virtual bool shutdown();
183 virtual bool hasTrackedCamera();
192 virtual bool useStereoOverlay();
195 virtual bool supportsDirectMirroring();
198 virtual void startMixedReality();
201 virtual void stopMixedReality();
204 virtual bool supportsMixedReality();
207 virtual bool supportsDepthBufferSubmission();
210 virtual bool supportsRealWorldDepthTesting();
213 virtual void startRealWorldDepthTesting();
216 virtual void stopRealWorldDepthTesting();
219 void setOverlayEnabled(
bool enabled);
222 void calibrateEyeTracking();
227 varjo_Session* findVarjoSystem()
const;
230 void commitEyeTexture(
vrvVirtualReality::DtEye eye, varjo_SwapChain* swapChain, varjo_SwapChain* depthSwapChain, osg::RenderInfo& renderInfo);
233 void commitEyeTexture(
unsigned int viewIndex, varjo_Viewport& viewPort,
int layer, varjo_SwapChain* swapChain, varjo_SwapChain* depthSwapChain);
236 void commitHudTexture(
unsigned int viewIndex,
int width,
int height, varjo_SwapChain* swapChain, osg::RenderInfo& renderInfo);
242 static bool isVrAvailable();
247 virtual void beginFrame();
250 virtual void beginRendering();
253 virtual void endRendering();
256 virtual void initViewports();
259 virtual void updateEyeProjections();
262 virtual void updateEyeProjections(
unsigned int viewIndex,
DtVirtualRealityChannel* vrChannel,
unsigned int layer,
bool updateVarjoViewOnly =
false,
bool isHudView =
false);
265 varjo_Viewport calculateFocusRect(varjo_Viewport contextViewport,
const double focusProjectionMatrix[16],
const double contextProjectionMatrix[16]);
267 #if VARJO_USE_GAZE == 1
268 varjo_Error initGaze();
272 bool getGazeNormalizedCoords(
const osg::Matrixd& leftProjection,
const osg::Matrixd& rightProjection,
273 osg::Vec2* left, osg::Vec2* right)
const;
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
Drawable and pre Drawcallback that draw full screen quad to update vrs image.
std::vector< varjo_LayerMultiProjView > myMultiprojectionViews
Definition: DtVarjoProvider.h:283
std::vector< varjo_ViewExtensionDepth > myExtDepthViews
Definition: DtVarjoProvider.h:284
std::map< DtVirtualRealityChannel *, osg::ref_ptr< DtVarjoVrsUpdater > > myChannelVrsUpdaters
out vrs updater
Definition: DtVarjoProvider.h:299
Wrapper around Nvidia Variable Rate Shading Image functionality Creates a texture of the correct size...
Definition: DtVariableRateShadingImage.h:75
GLint myStepsUniformLocation
Definition: DtVarjoProvider.h:82
DtVirtualRealityDriver * myDriverHandle
store a handle to the driver to avoid repeated lookup
Definition: DtVarjoProvider.h:302
bool myEyeTrackingInitalized
Definition: DtVarjoProvider.h:290
GLint myEyeCenterRightUniformLocation
Definition: DtVarjoProvider.h:80
Contains DLL export macros.
osg::Vec3d myHmdPostionOffset
Definition: DtVarjoProvider.h:292
std::vector< ViewSettings > myViewSettings
Definition: DtVarjoProvider.h:281
bool myHaveCalibratedEyeTracking
Definition: DtVarjoProvider.h:291
ViewSettings()
CTOR.
Definition: DtVarjoProvider.h:100
A Varjo implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtVarjoProvider.h:91
An abstract interface that provides VR System API services.
A Tracked camera is typically attached to the HMD and can provide position and orientation data in ad...
Definition: DtTrackedCamera.h:27
double myFarClip
Definition: DtVarjoProvider.h:106
Base class for GPU updates of the variable rate shading image Draw a full screen quad using a shader ...
Definition: DtVariableRateShadingImageUpdater.h:26
std::vector< varjo_Viewport > myViewports
Definition: DtVarjoProvider.h:280
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:51
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
A Varjo implementation of the DtVariableRateShadingImageUpdater Supports updating the vrs map as foav...
Definition: DtVarjoProvider.h:46
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:38
varjo_Session * myVarjoSession
Definition: DtVarjoProvider.h:278
osg::Quat myHmdRotationOffset
Definition: DtVarjoProvider.h:293
GLint myEyeCenterLeftUniformLocation
Definition: DtVarjoProvider.h:79
GLint myEdgeUniformLocation
Definition: DtVarjoProvider.h:81
std::vector< varjo_ViewExtensionDepthTestRange > myExtDepthTestRangeViews
Definition: DtVarjoProvider.h:285
An abstract interface that provides VR System API services.
Definition: DtVirtualRealityProvider.h:45
Contains makVrv::DtQuat class.
A VRV channel that represents the eyes of the HMD A Virtual Reality channel can render in a few diffe...
Definition: DtVirtualRealityChannel.h:29
Object to handle rendering a mixed reality mask object into the scene.
Definition: DtMixedRealityMask.h:38
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitOverlayCallback.h:26
varjo_World * myVarjoWorld
Definition: DtVarjoProvider.h:295
bool myUseDepthLayers
Definition: DtVarjoProvider.h:282
std::vector< varjo_LayerMultiProjView > myHudViews
Definition: DtVarjoProvider.h:286
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A utility Quaternion class.
Definition: DtQuat.h:19
std::unordered_map< int64_t, DtTrackedMarker > myTrackedMarkers
Definition: DtVarjoProvider.h:296
varjo_FrameInfo * myFrameInfo
Definition: DtVarjoProvider.h:287
double myNearClip
Definition: DtVarjoProvider.h:105
Wraps functionality of Variable Rate Shading Image.
std::string myDeviceName
Definition: DtVarjoProvider.h:288
A post processing effect responsible for submitting and mirroring the eye views to the VR subsystem...
Definition: DtVirtualRealityPostProcessor.h:34
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitViewCallback.h:29
Holds settings related to a view.
Definition: DtVarjoProvider.h:97
GLint myEyeCenterUniformLocation
Definition: DtVarjoProvider.h:78
int32_t myViewCount
Definition: DtVarjoProvider.h:279