VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

A Varjo implementation of the DtVirtualRealityProvider abstract base class.

Inheritance diagram for makVrv::DtVarjoProvider:
Inheritance graph
[legend]

Classes

struct  ViewSettings
 

Public Member Functions

 DtVarjoProvider (DtDe &de)
 
virtual ~DtVarjoProvider ()
 
virtual DtSubmitOverlayCallbackcreateOverlayCallback (osg::Texture *tex, DtDe &de, DtVirtualRealityDriver &driver)
 
virtual DtSubmitViewCallbackcreateViewCallback (DtVirtualRealityPostProcessor &pp, DtVirtualRealityDriver &driver, vrvVirtualReality::DtEye eye)
 
virtual DtBeginFrameCallbackcreateBeginFrameCallback (DtVirtualRealityDriver &driver, vrvVirtualReality::DtEye eye)
 
virtual const std::string & providerName ()
 
virtual const std::string & deviceName ()
 
virtual bool initializeVR ()
 
virtual bool hasFocusViews ()
 
virtual bool useVrs ()
 
virtual
DtVariableRateShadingImageUpdater
findVrsUpdater (DtVirtualRealityChannel *channel)
 
virtual void getRecommendedRenderTargetSize (int &width, int &height, vrvVirtualReality::DtEye whichEye)
 
virtual DtSwapChainallocateSwapChain (vrvVirtualReality::DtEye whichEye, bool isOverlay)
 
virtual void getProjectionAngles (vrvVirtualReality::DtEye eye, double &left, double &right, double &bottom, double &top, double znear, double zfar)
 
virtual osg::Matrixd getEyeToHeadTransform (vrvVirtualReality::DtEye eye)
 
virtual void commitEyeTexture (osg::RenderInfo &renderInfo, DtSwapChain *swapChain)
 
virtual void commitHudTexture (osg::RenderInfo &renderInfo, DtSwapChain *swapChain)
 
virtual void updateOverlayDimensions (float width, float height, float distance, int pixWidth, int pixHeight)
 
virtual void tick ()
 
virtual bool getHmdPose (DtVector &pos, DtQuat &ori)
 
virtual void setHmdPoseOffset (const DtVector &pos, const DtQuat &ori)
 
virtual bool getTrackedPose (DtVector &pos, DtQuat &ori, int index)
 
virtual const
std::unordered_map< int64_t,
DtTrackedMarker > & 
getTrackedMarkers () const
 
virtual bool reset ()
 
virtual void triggerAction1 ()
 
virtual bool shutdown ()
 
virtual bool hasTrackedCamera ()
 
virtual DtTrackedCamerafindTrackedCamera ()
 
virtual DtMixedRealityMaskfindMixedRealityMask ()
 
virtual
vrvVirtualReality::DtVrOverlayMode 
overlayMode ()
 
virtual void startMixedReality ()
 
virtual void stopMixedReality ()
 
virtual bool supportsMixedReality ()
 
virtual bool supportsDepthBufferSubmission ()
 
virtual bool supportsRealWorldDepthTesting ()
 
virtual void startRealWorldDepthTesting ()
 
virtual void stopRealWorldDepthTesting ()
 
void setOverlayEnabled (bool enabled)
 
void calibrateEyeTracking ()
 
varjo_Session * findVarjoSystem () const
 
- Public Member Functions inherited from makVrv::DtVirtualRealityProvider
 DtVirtualRealityProvider (DtDe &de)
 
virtual ~DtVirtualRealityProvider ()
 
virtual bool mixedRealityRunning () const
 
virtual bool realWorldDepthTestingEnabled () const
 

Static Public Member Functions

static bool isVrAvailable ()
 

Public Attributes

friend DtVarjoBeginFrameCallback
 
friend DtVarjoWaitForSyncThread
 

Protected Member Functions

void invokeWaitForSyncOp ()
 
void blockTillWaitForSyncComplete ()
 
virtual void beginFrame ()
 
virtual void beginRendering ()
 
virtual void endRendering ()
 
virtual void initViewports ()
 
void commitEyeTexture (unsigned int viewIndex, varjo_Viewport &viewPort, int layer, varjo_SwapChain *swapChain, varjo_SwapChain *depthSwapChain)
 
void commitHudTexture (unsigned int viewIndex, varjo_Viewport viewPort, varjo_SwapChain *swapChain)
 
virtual void updateEyeProjections ()
 
virtual void updateEyeProjections (unsigned int viewIndex, DtVirtualRealityChannel *vrChannel, unsigned int layer, bool updateVarjoViewOnly=false, bool isHudView=false)
 
varjo_Viewport calculateFocusRect (varjo_Viewport contextViewport, const double focusProjectionMatrix[16], const double contextProjectionMatrix[16])
 
varjo_Error initGaze ()
 
bool getGazeNormalizedCoords (const osg::Matrixd &leftProjection, const osg::Matrixd &rightProjection, osg::Vec2 *left, osg::Vec2 *right) const
 

Protected Attributes

varjo_Session * myVarjoSession
 
int32_t myViewCount
 
std::vector< varjo_Viewport > myViewports
 
std::vector< ViewSettingsmyViewSettings
 
bool myUseDepthLayers
 
std::vector
< varjo_LayerMultiProjView > 
myMultiprojectionViews
 
std::vector
< varjo_ViewExtensionDepth > 
myExtDepthViews
 
std::vector
< varjo_ViewExtensionDepthTestRange > 
myExtDepthTestRangeViews
 
std::vector
< varjo_LayerMultiProjView > 
myHudViews
 
varjo_FrameInfo * myFrameInfo
 
std::string myDeviceName
 
bool myEyeTrackingInitalized
 
bool myHaveCalibratedEyeTracking
 
osg::Vec3d myHmdPostionOffset
 
osg::Quat myHmdRotationOffset
 
varjo_World * myVarjoWorld
 
std::unordered_map< int64_t,
DtTrackedMarker
myTrackedMarkers
 
DtVarjoWaitForSyncThreadmyWaitForSyncThread
 
- Protected Attributes inherited from makVrv::DtVirtualRealityProvider
DtDemyDe
 
DtVirtualRealityDrivermyDriverHandle
 
DtTrackedCameramyTrackedCamera
 
DtMixedRealityMaskmyMixedRealityMask
 
bool myMixedRealityRunning
 
bool myRealWorldDepthTestingEnabled
 
std::map
< DtVirtualRealityChannel
*, osg::ref_ptr
< DtVariableRateShadingImageUpdater > > 
myChannelVrsUpdaters
 

Private Member Functions

 DtVarjoProvider ()
 
 DtVarjoProvider (const DtVarjoProvider &)
 
DtVarjoProvideroperator= (const DtVarjoProvider &)
 

Constructor & Destructor Documentation

makVrv::DtVarjoProvider::DtVarjoProvider ( DtDe de)

CTOR.

virtual makVrv::DtVarjoProvider::~DtVarjoProvider ( )
virtual

DTOR.

makVrv::DtVarjoProvider::DtVarjoProvider ( )
private

default CTOR.

makVrv::DtVarjoProvider::DtVarjoProvider ( const DtVarjoProvider )
private

default copy constructor

Member Function Documentation

DtVarjoProvider& makVrv::DtVarjoProvider::operator= ( const DtVarjoProvider )
private

assignment operator

virtual DtSubmitOverlayCallback* makVrv::DtVarjoProvider::createOverlayCallback ( osg::Texture *  tex,
DtDe de,
DtVirtualRealityDriver driver 
)
virtual

create a system specific overlay callback

Implements makVrv::DtVirtualRealityProvider.

virtual DtSubmitViewCallback* makVrv::DtVarjoProvider::createViewCallback ( DtVirtualRealityPostProcessor pp,
DtVirtualRealityDriver driver,
vrvVirtualReality::DtEye  eye 
)
virtual

create a system specific view callback

Implements makVrv::DtVirtualRealityProvider.

virtual DtBeginFrameCallback* makVrv::DtVarjoProvider::createBeginFrameCallback ( DtVirtualRealityDriver driver,
vrvVirtualReality::DtEye  eye 
)
virtual

create a system specific camera predraw callback

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual const std::string& makVrv::DtVarjoProvider::providerName ( )
virtual

get the name of this VR System provider

Implements makVrv::DtVirtualRealityProvider.

virtual const std::string& makVrv::DtVarjoProvider::deviceName ( )
virtual

some systems can support multiple devices. Get the name of the attached device

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::initializeVR ( )
virtual

initialize the VR subsystem

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::hasFocusViews ( )
virtual

does this headset support focus views

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::useVrs ( )
virtual

should we use variable rate shading

Implements makVrv::DtVirtualRealityProvider.

virtual DtVariableRateShadingImageUpdater* makVrv::DtVarjoProvider::findVrsUpdater ( DtVirtualRealityChannel channel)
virtual

return a vrs updater allocating it if needed

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::getRecommendedRenderTargetSize ( int width,
int height,
vrvVirtualReality::DtEye  whichEye 
)
virtual

get recommended VR target size

Implements makVrv::DtVirtualRealityProvider.

virtual DtSwapChain* makVrv::DtVarjoProvider::allocateSwapChain ( vrvVirtualReality::DtEye  whichEye,
bool  isOverlay 
)
virtual

allocate a swapchain for this provider

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::getProjectionAngles ( vrvVirtualReality::DtEye  eye,
double left,
double right,
double bottom,
double top,
double  znear,
double  zfar 
)
virtual

get recommended projection frustum angles in degrees. Znear and zFar are passed in

Implements makVrv::DtVirtualRealityProvider.

virtual osg::Matrixd makVrv::DtVarjoProvider::getEyeToHeadTransform ( vrvVirtualReality::DtEye  eye)
virtual

get the head to eye transform

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::commitEyeTexture ( osg::RenderInfo &  renderInfo,
DtSwapChain swapChain 
)
virtual

provider specific commit of eye texture to the HMD

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::commitHudTexture ( osg::RenderInfo &  renderInfo,
DtSwapChain swapChain 
)
virtual

provider specific commit of hud texture to the HMD

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::updateOverlayDimensions ( float  width,
float  height,
float  distance,
int  pixWidth,
int  pixHeight 
)
virtual

update hud overlay dimensions

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::tick ( )
virtual

update the VR system

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::getHmdPose ( DtVector pos,
DtQuat ori 
)
virtual

get the HMD pose

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::setHmdPoseOffset ( const DtVector pos,
const DtQuat ori 
)
virtual

set an constant offset to the hmd pose

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::getTrackedPose ( DtVector pos,
DtQuat ori,
int  index 
)
virtual

get the pose of a tracked item

Implements makVrv::DtVirtualRealityProvider.

virtual const std::unordered_map<int64_t, DtTrackedMarker>& makVrv::DtVarjoProvider::getTrackedMarkers ( ) const
virtual

returns the map of currently tracked markers

virtual bool makVrv::DtVarjoProvider::reset ( )
virtual

reset the HMD

Implements makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::triggerAction1 ( )
virtual

trigger generic action, for varjo that tiggers an eye calibration

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::shutdown ( )
virtual

shutdown the VR subsystem

Implements makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::hasTrackedCamera ( )
virtual

check if there is a tracked camera

Implements makVrv::DtVirtualRealityProvider.

virtual DtTrackedCamera* makVrv::DtVarjoProvider::findTrackedCamera ( )
virtual

get the tracked camera of the VR system.

Implements makVrv::DtVirtualRealityProvider.

virtual DtMixedRealityMask* makVrv::DtVarjoProvider::findMixedRealityMask ( )
virtual

create a mixed reality mask allowing provider specific implementations

Implements makVrv::DtVirtualRealityProvider.

virtual vrvVirtualReality::DtVrOverlayMode makVrv::DtVarjoProvider::overlayMode ( )
virtual

should the overlay be rendered as strereo to another render texture

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::startMixedReality ( )
virtual

start mixed reality camera and blending etc

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::stopMixedReality ( )
virtual

stop mixed reality camera and blending etc

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::supportsMixedReality ( )
virtual

reuturns true if the headset is capable of supporting mixed reality

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::supportsDepthBufferSubmission ( )
virtual

\ breif returns true if the headset supports depth buffer submission for positional warp etc

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::supportsRealWorldDepthTesting ( )
virtual

\ breif returns true if the headset supports depth testing against the real world

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::startRealWorldDepthTesting ( )
virtual

\ breif start performing real world depth testing

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual void makVrv::DtVarjoProvider::stopRealWorldDepthTesting ( )
virtual

\ breif stop performing real world depth testing

Reimplemented from makVrv::DtVirtualRealityProvider.

void makVrv::DtVarjoProvider::setOverlayEnabled ( bool  enabled)

set whether or not the overlay is enabled and submitted to the Varjo system

void makVrv::DtVarjoProvider::calibrateEyeTracking ( )
varjo_Session* makVrv::DtVarjoProvider::findVarjoSystem ( ) const

non-virtual functions provide Varjo specific functionality.

return the Varjo specific session

static bool makVrv::DtVarjoProvider::isVrAvailable ( )
static

Is this VR system available and an HMD connected for use. May be called without instantiating the provider.

void makVrv::DtVarjoProvider::invokeWaitForSyncOp ( )
protected

function run on seperate thread to perform varjo waitSync

void makVrv::DtVarjoProvider::blockTillWaitForSyncComplete ( )
protected

wait for the waitforsync thread to complete

virtual void makVrv::DtVarjoProvider::beginFrame ( )
protectedvirtual

pretick signal call to begin the frame

virtual void makVrv::DtVarjoProvider::beginRendering ( )
protectedvirtual

postupdate renderer call to begin rendering

virtual void makVrv::DtVarjoProvider::endRendering ( )
protectedvirtual

posttick signal call to end rendering

virtual void makVrv::DtVarjoProvider::initViewports ( )
protectedvirtual

initialize the VR viewports

void makVrv::DtVarjoProvider::commitEyeTexture ( unsigned int  viewIndex,
varjo_Viewport &  viewPort,
int  layer,
varjo_SwapChain *  swapChain,
varjo_SwapChain *  depthSwapChain 
)
protected

internal commit an eye texture to the Varjo system

void makVrv::DtVarjoProvider::commitHudTexture ( unsigned int  viewIndex,
varjo_Viewport  viewPort,
varjo_SwapChain *  swapChain 
)
protected

internal commit a hud texture to the varjo system

virtual void makVrv::DtVarjoProvider::updateEyeProjections ( )
protectedvirtual

relays projection and eye transforms from varjo to channels/views.

virtual void makVrv::DtVarjoProvider::updateEyeProjections ( unsigned int  viewIndex,
DtVirtualRealityChannel vrChannel,
unsigned int  layer,
bool  updateVarjoViewOnly = false,
bool  isHudView = false 
)
protectedvirtual

relays projection and eye transforms from varjo to a specific channel

varjo_Viewport makVrv::DtVarjoProvider::calculateFocusRect ( varjo_Viewport  contextViewport,
const double  focusProjectionMatrix[16],
const double  contextProjectionMatrix[16] 
)
protected

calculate a new focus rect based on the context rect and projection matrix

varjo_Error makVrv::DtVarjoProvider::initGaze ( )
protected

initalise the varjo gaze tracking

bool makVrv::DtVarjoProvider::getGazeNormalizedCoords ( const osg::Matrixd &  leftProjection,
const osg::Matrixd &  rightProjection,
osg::Vec2 *  left,
osg::Vec2 *  right 
) const
protected

brief calculate normalised gaze coords

Member Data Documentation

friend makVrv::DtVarjoProvider::DtVarjoBeginFrameCallback
friend makVrv::DtVarjoProvider::DtVarjoWaitForSyncThread
varjo_Session* makVrv::DtVarjoProvider::myVarjoSession
protected
int32_t makVrv::DtVarjoProvider::myViewCount
protected
std::vector<varjo_Viewport> makVrv::DtVarjoProvider::myViewports
protected
std::vector<ViewSettings> makVrv::DtVarjoProvider::myViewSettings
protected
bool makVrv::DtVarjoProvider::myUseDepthLayers
protected
std::vector<varjo_LayerMultiProjView> makVrv::DtVarjoProvider::myMultiprojectionViews
protected
std::vector<varjo_ViewExtensionDepth> makVrv::DtVarjoProvider::myExtDepthViews
protected
std::vector<varjo_ViewExtensionDepthTestRange> makVrv::DtVarjoProvider::myExtDepthTestRangeViews
protected
std::vector<varjo_LayerMultiProjView> makVrv::DtVarjoProvider::myHudViews
protected
varjo_FrameInfo* makVrv::DtVarjoProvider::myFrameInfo
protected
std::string makVrv::DtVarjoProvider::myDeviceName
protected
bool makVrv::DtVarjoProvider::myEyeTrackingInitalized
protected
bool makVrv::DtVarjoProvider::myHaveCalibratedEyeTracking
protected
osg::Vec3d makVrv::DtVarjoProvider::myHmdPostionOffset
protected
osg::Quat makVrv::DtVarjoProvider::myHmdRotationOffset
protected
varjo_World* makVrv::DtVarjoProvider::myVarjoWorld
protected
std::unordered_map<int64_t, DtTrackedMarker> makVrv::DtVarjoProvider::myTrackedMarkers
protected
DtVarjoWaitForSyncThread* makVrv::DtVarjoProvider::myWaitForSyncThread
protected

The documentation for this class was generated from the following file:

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)