VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOpenVRProvider.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <vrvUtil/DtQuat.h>
16 #include <matrix/vlVector.h>
17 
18 #include <osg/Matrixd>
19 
20 #include <string>
21 
22 namespace vr
23 {
24  class IVRSystem;
25  struct TrackedDevicePose_t;
26 }
27 
28 
29 namespace makVrv
30 {
34  {
35  private:
38 
41 
43  DtOpenVRProvider& operator=(const DtOpenVRProvider&);
44 
45  public:
48  static bool isVrAvailable();
49 
50  public:
53 
55  virtual ~DtOpenVRProvider();
56 
58  virtual DtSubmitOverlayCallback* createOverlayCallback(osg::Texture* tex, DtDe& de, DtVirtualRealityDriver& driver);
59 
62 
64  virtual const std::string& providerName();
65 
67  virtual const std::string& deviceName();
68 
70  virtual bool initializeVR();
71 
73  virtual bool hasFocusViews();
74 
76  virtual bool useVrs();
77 
79  virtual DtVariableRateShadingImageUpdater* findVrsUpdater(DtVirtualRealityChannel* channel);
80 
82  virtual void getRecommendedRenderTargetSize(int& width, int& height, vrvVirtualReality::DtEye whichEye);
83 
85  virtual void getProjectionAngles(vrvVirtualReality::DtEye eye, double& left, double& right, double& bottom, double& top, double znear, double zfar);
86 
88  virtual osg::Matrixd getEyeToHeadTransform(vrvVirtualReality::DtEye eye);
89 
91  virtual void tick();
92 
94  virtual bool getHmdPose(DtVector& pos, DtQuat& ori);
95 
97  virtual void setHmdPoseOffset(const DtVector& pos, const DtQuat& ori);
98 
100  virtual bool getTrackedPose(DtVector& pos, DtQuat& ori, int index);
101 
103  virtual bool reset();
104 
106  virtual bool shutdown();
107 
109  virtual bool hasTrackedCamera();
110 
112  virtual DtTrackedCamera* findTrackedCamera();
113 
115  virtual DtMixedRealityMask* findMixedRealityMask();
116 
118  virtual vr::IVRSystem* findOpenVRSystem() const;
119 
120  protected:
122  virtual void beginFrame();
123 
124  //OpenVR Structs
125  vr::IVRSystem* myVrSystem;
126  vr::TrackedDevicePose_t* myTrackedPoses;
127 
128  std::string myDeviceName;
129  };
130 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
Contains DLL export macros.
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
Base class for GPU updates of the variable rate shading image Draw a full screen quad using a shader ...
Definition: DtVariableRateShadingImageUpdater.h:26
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:51
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
vr::IVRSystem * myVrSystem
Definition: DtOpenVRProvider.h:125
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:38
An OpenVR implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtOpenVRProvider.h:33
std::string myDeviceName
Definition: DtOpenVRProvider.h:128
An abstract interface that provides VR System API services.
Definition: DtVirtualRealityProvider.h:45
Contains makVrv::DtQuat class.
vr::TrackedDevicePose_t * myTrackedPoses
Definition: DtOpenVRProvider.h:126
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
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A utility Quaternion class.
Definition: DtQuat.h:19
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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)