VR-Forces 5.0.1 Developer's Guide
 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) 2022 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 DtSwapChain* allocateSwapChain(vrvVirtualReality::DtEye whichEye, bool isOverlay);
86 
88  virtual void getProjectionAngles(vrvVirtualReality::DtEye eye, double& left, double& right, double& bottom, double& top, double znear, double zfar);
89 
91  virtual osg::Matrixd getEyeToHeadTransform(vrvVirtualReality::DtEye eye);
92 
94  virtual void commitEyeTexture(osg::RenderInfo& renderInfo, DtSwapChain* swapChain);
95 
97  virtual void commitHudTexture(osg::RenderInfo& renderInfo, DtSwapChain* swapChain);
98 
100  virtual void updateOverlayDimensions(float width, float height, float distance, int pixWidth, int pixHeight);
101 
103  virtual void tick();
104 
106  virtual bool getHmdPose(DtVector& pos, DtQuat& ori);
107 
109  virtual void setHmdPoseOffset(const DtVector& pos, const DtQuat& ori);
110 
112  virtual bool getTrackedPose(DtVector& pos, DtQuat& ori, int index);
113 
115  virtual bool reset();
116 
118  virtual bool shutdown();
119 
121  virtual bool hasTrackedCamera();
122 
124  virtual DtTrackedCamera* findTrackedCamera();
125 
127  virtual DtMixedRealityMask* findMixedRealityMask();
128 
130  virtual vr::IVRSystem* findOpenVRSystem() const;
131 
132  protected:
134  virtual void beginFrame();
135 
136  //OpenVR Structs
137  vr::IVRSystem* myVrSystem;
138  vr::TrackedDevicePose_t* myTrackedPoses;
139 
140  uint64_t myOverlay;
141 
142  std::string myDeviceName;
143  };
144 }
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:52
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
vr::IVRSystem * myVrSystem
Definition: DtOpenVRProvider.h:137
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:37
An OpenVR implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtOpenVRProvider.h:33
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
Base implementation of a texture swapchain.
Definition: DtSwapChain.h:35
std::string myDeviceName
Definition: DtOpenVRProvider.h:142
An abstract interface that provides VR System API services. Providers are created and provided to the...
Definition: DtVirtualRealityProvider.h:47
Contains makVrv::DtQuat class.
vr::TrackedDevicePose_t * myTrackedPoses
Definition: DtOpenVRProvider.h:138
A VRV channel that represents the eyes of the HMD A Virtual Reality channel can render in a few diffe...
Definition: DtVirtualRealityChannel.h:30
Object to handle rendering a mixed reality mask object into the scene. Typically the it renders an ob...
Definition: DtMixedRealityMask.h:38
uint64_t myOverlay
Definition: DtOpenVRProvider.h:140
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitOverlayCallback.h:28
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
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:30

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)