VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDesktopProvider.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
15 
16 #include <vrvUtil/DtQuat.h>
17 #include <matrix/vlVector.h>
18 
19 #include <osg/Matrixd>
20 
21 #include <string>
22 
23 #include "OVR_CAPI.h"
24 
25 namespace makVrv
26 {
29 
31  {
32  private:
35 
38 
40  DtDesktopProvider& operator=(const DtDesktopProvider&);
41 
42  public:
45  static bool isVrAvailable();
46  public:
49 
51  virtual ~DtDesktopProvider();
52 
54  virtual DtSubmitOverlayCallback* createOverlayCallback(osg::Texture* tex, DtDe& de, DtVirtualRealityDriver& driver);
55 
58 
60  virtual const std::string& providerName();
61 
63  virtual const std::string& deviceName();
64 
66  virtual bool initializeVR();
67 
69  virtual bool hasFocusViews();
70 
72  virtual bool useVrs();
73 
75  virtual DtVariableRateShadingImageUpdater* findVrsUpdater(DtVirtualRealityChannel* channel);
76 
78  virtual void getRecommendedRenderTargetSize(int& width, int& height, vrvVirtualReality::DtEye whichEye);
79 
81  virtual DtSwapChain* allocateSwapChain(vrvVirtualReality::DtEye whichEye, bool isOverlay);
82 
84  virtual void getProjectionAngles(vrvVirtualReality::DtEye eye, double& left, double& right, double& bottom, double& top, double znear, double zfar);
85 
87  virtual osg::Matrixd getEyeToHeadTransform(vrvVirtualReality::DtEye eye);
88 
90  virtual void commitEyeTexture(osg::RenderInfo& renderInfo, DtSwapChain* swapChain);
91 
93  virtual void commitHudTexture(osg::RenderInfo& renderInfo, DtSwapChain* swapChain);
94 
96  void generateBlendedSwapChain(osg::RenderInfo& renderInfo);
97 
99  virtual void updateOverlayDimensions(float width, float height, float distance, int pixWidth, int pixHeight);
100 
102  virtual void tick();
103 
105  virtual void beginFrame();
106 
108  virtual void beginRendering();
109 
111  virtual void endRendering();
112 
114  virtual bool getHmdPose(DtVector& pos, DtQuat& ori);
115 
117  virtual void setHmdPoseOffset(const DtVector& pos, const DtQuat& ori);
118 
120  virtual bool getTrackedPose(DtVector& pos, DtQuat& ori, int index);
121 
123  virtual bool reset();
124 
126  virtual bool shutdown();
127 
129  virtual bool hasTrackedCamera();
130 
132  virtual DtTrackedCamera* findTrackedCamera();
133 
135  virtual DtMixedRealityMask* findMixedRealityMask();
136 
138  virtual vrvVirtualReality::DtVrOverlayMode overlayMode();
139 
141  virtual bool supportsDepthBufferSubmission();
142 
143  protected:
144 
145  int myWidth;
146  int myHeight;
147  long long myFrameIndex;
149 
151 
155  };
156 }
long long myFrameIndex
Definition: DtDesktopProvider.h:147
Contains DLL export macros.
DtSwapChain * myFrameHudSwapChain
Definition: DtDesktopProvider.h:154
int myWidth
Definition: DtDesktopProvider.h:145
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
An Oculus implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtDesktopProvider.h:30
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:54
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
OpenVR doesn&#39;t use a swapchain, but currently we need to unpack the texture array into a texture 2d w...
Definition: DtOpenVRSwapChain.h:22
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:37
bool myHudEnabled
Definition: DtDesktopProvider.h:150
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:37
An abstract interface that provides VR System API services. Providers are created and provided to the...
Definition: DtVirtualRealityProvider.h:47
Contains makVrv::DtQuat class.
int myHeight
Definition: DtDesktopProvider.h:146
DtVrOverlayMode
Virtual reality render mode.
Definition: vrvVirtualReality.h:63
DtOpenVRSwapChain * mySwapChain
Definition: DtDesktopProvider.h:152
bool myFrameBegan
Definition: DtDesktopProvider.h:148
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
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitOverlayCallback.h:32
DtSwapChain * myFrameEyeSwapChain
Definition: DtDesktopProvider.h:153
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:72
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)