VR-Forces 4.10 Class Documentation
 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 | Protected Member Functions | Protected Attributes | Private Member Functions

A Varjo implementation of the DtVirtualRealityProvider abstract base class. More...

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

Classes

struct  ViewSettings
 Holds settings related to a view. More...
 

Public Member Functions

 DtVarjoProvider (DtDe &de)
 CTOR. More...
 
virtual ~DtVarjoProvider ()
 DTOR. More...
 
virtual DtSubmitOverlayCallbackcreateOverlayCallback (osg::Texture *tex, DtDe &de, DtVirtualRealityDriver &driver)
 create a system specific overlay callback More...
 
virtual DtSubmitViewCallbackcreateViewCallback (DtVirtualRealityPostProcessor &pp, DtVirtualRealityDriver &driver, vrvVirtualReality::DtEye eye)
 create a system specific view callback More...
 
virtual const std::string & providerName ()
 get the name of this VR System provider More...
 
virtual const std::string & deviceName ()
 some systems can support multiple devices. Get the name of the attached device More...
 
virtual bool initializeVR ()
 initialize the VR subsystem More...
 
virtual bool hasFocusViews ()
 does this headset support focus views More...
 
virtual bool useVrs ()
 should we use variable rate shading More...
 
virtual
DtVariableRateShadingImageUpdater
findVrsUpdater (DtVirtualRealityChannel *channel)
 return a vrs updater allocating it if needed More...
 
virtual void getRecommendedRenderTargetSize (int &width, int &height, vrvVirtualReality::DtEye whichEye)
 get recommended VR target size More...
 
virtual void getProjectionAngles (vrvVirtualReality::DtEye eye, double &left, double &right, double &bottom, double &top, double znear, double zfar)
 get recommended projection frustum angles in degrees. Znear and zFar are passed in More...
 
virtual osg::Matrixd getEyeToHeadTransform (vrvVirtualReality::DtEye eye)
 get the head to eye transform More...
 
virtual void tick ()
 update the VR system More...
 
virtual bool getHmdPose (DtVector &pos, DtQuat &ori)
 get the HMD pose More...
 
virtual void setHmdPoseOffset (const DtVector &pos, const DtQuat &ori)
 set an constant offset to the hmd pose More...
 
virtual bool getTrackedPose (DtVector &pos, DtQuat &ori, int index)
 get the pose of a tracked item More...
 
virtual const
std::unordered_map< int64_t,
DtTrackedMarker > & 
getTrackedMarkers () const
 returns the map of currently tracked markers More...
 
virtual bool reset ()
 reset the HMD More...
 
virtual bool shutdown ()
 shutdown the VR subsystem More...
 
virtual bool hasTrackedCamera ()
 check if there is a tracked camera More...
 
virtual DtTrackedCamerafindTrackedCamera ()
 get the tracked camera of the VR system. More...
 
virtual DtMixedRealityMaskfindMixedRealityMask ()
 create a mixed reality mask allowing provider specific implementations More...
 
virtual bool useStereoOverlay ()
 should the overlay be rendered as strereo to another render texture More...
 
virtual bool supportsDirectMirroring ()
 does this provider handle displaying the mirror view More...
 
virtual void startMixedReality ()
 start mixed reality camera and blending etc More...
 
virtual void stopMixedReality ()
 stop mixed reality camera and blending etc More...
 
virtual bool supportsMixedReality ()
 reuturns true if the headset is capable of supporting mixed reality More...
 
virtual bool supportsDepthBufferSubmission ()
 \ breif returns true if the headset supports depth buffer submission for positional warp etc More...
 
virtual bool supportsRealWorldDepthTesting ()
 \ breif returns true if the headset supports depth testing against the real world More...
 
virtual void startRealWorldDepthTesting ()
 \ breif start performing real world depth testing More...
 
virtual void stopRealWorldDepthTesting ()
 \ breif stop performing real world depth testing More...
 
void setOverlayEnabled (bool enabled)
 set whether or not the overlay is enabled and submitted to the Varjo system More...
 
void calibrateEyeTracking ()
 
varjo_Session * findVarjoSystem () const
 non-virtual functions provide Varjo specific functionality. More...
 
void commitEyeTexture (vrvVirtualReality::DtEye eye, varjo_SwapChain *swapChain, varjo_SwapChain *depthSwapChain, osg::RenderInfo &renderInfo)
 internal commit an eye texture to the Varjo system More...
 
void commitEyeTexture (unsigned int viewIndex, varjo_Viewport &viewPort, int layer, varjo_SwapChain *swapChain, varjo_SwapChain *depthSwapChain)
 internal commit an eye texture to the Varjo system More...
 
void commitHudTexture (unsigned int viewIndex, int width, int height, varjo_SwapChain *swapChain, osg::RenderInfo &renderInfo)
 internal commit a hud texture to the varjo system More...
 
- Public Member Functions inherited from makVrv::DtVirtualRealityProvider
 DtVirtualRealityProvider (DtDe &de)
 CTOR. More...
 
virtual ~DtVirtualRealityProvider ()
 DTOR. More...
 
virtual bool mixedRealityRunning () const
 returns true if mixed reality is active and running More...
 
virtual bool realWorldDepthTestingEnabled () const
 \ brief returns true if real world depth testing is enabled More...
 

Static Public Member Functions

static bool isVrAvailable ()
 Is this VR system available and an HMD connected for use. More...
 

Protected Member Functions

virtual void beginFrame ()
 pretick signal call to begin the frame More...
 
virtual void beginRendering ()
 postupdate renderer call to begin rendering More...
 
virtual void endRendering ()
 posttick signal call to end rendering More...
 
virtual void initViewports ()
 initialize the VR viewports More...
 
virtual void updateEyeProjections ()
 relays projection and eye transforms from varjo to channels/views. More...
 
virtual void updateEyeProjections (unsigned int viewIndex, DtVirtualRealityChannel *vrChannel, unsigned int layer, bool updateVarjoViewOnly=false, bool isHudView=false)
 relays projection and eye transforms from varjo to a specific channel More...
 
varjo_Viewport calculateFocusRect (varjo_Viewport contextViewport, const double focusProjectionMatrix[16], const double contextProjectionMatrix[16])
 calculate a new focus rect based on the context rect and projection matrix More...
 
varjo_Error initGaze ()
 initalise the varjo gaze tracking More...
 
bool getGazeNormalizedCoords (const osg::Matrixd &leftProjection, const osg::Matrixd &rightProjection, osg::Vec2 *left, osg::Vec2 *right) const
 brief calculate normalised gaze coords More...
 

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
 
std::map
< DtVirtualRealityChannel
*, osg::ref_ptr
< DtVarjoVrsUpdater > > 
myChannelVrsUpdaters
 out vrs updater More...
 
DtVirtualRealityDrivermyDriverHandle
 store a handle to the driver to avoid repeated lookup More...
 
- Protected Attributes inherited from makVrv::DtVirtualRealityProvider
DtDemyDe
 
DtTrackedCameramyTrackedCamera
 
DtMixedRealityMaskmyMixedRealityMask
 
bool myMixedRealityRunning
 
bool myRealWorldDepthTestingEnabled
 

Private Member Functions

 DtVarjoProvider ()
 default CTOR. More...
 
 DtVarjoProvider (const DtVarjoProvider &)
 default copy constructor More...
 
DtVarjoProvideroperator= (const DtVarjoProvider &)
 assignment operator More...
 

Detailed Description

A Varjo implementation of the DtVirtualRealityProvider abstract base class.

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 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 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::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 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 bool makVrv::DtVarjoProvider::useStereoOverlay ( )
virtual

should the overlay be rendered as strereo to another render texture

Reimplemented from makVrv::DtVirtualRealityProvider.

virtual bool makVrv::DtVarjoProvider::supportsDirectMirroring ( )
virtual

does this provider handle displaying the mirror view

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

void makVrv::DtVarjoProvider::commitEyeTexture ( vrvVirtualReality::DtEye  eye,
varjo_SwapChain *  swapChain,
varjo_SwapChain *  depthSwapChain,
osg::RenderInfo &  renderInfo 
)

internal commit an eye texture to the Varjo system

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

internal commit an eye texture to the Varjo system

void makVrv::DtVarjoProvider::commitHudTexture ( unsigned int  viewIndex,
int  width,
int  height,
varjo_SwapChain *  swapChain,
osg::RenderInfo &  renderInfo 
)

internal commit a hud texture to the varjo system

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

Is this VR system available and an HMD connected for use.

May be called without instantiating the provider.

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

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

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
std::map<DtVirtualRealityChannel*, osg::ref_ptr<DtVarjoVrsUpdater> > makVrv::DtVarjoProvider::myChannelVrsUpdaters
protected

out vrs updater

DtVirtualRealityDriver* makVrv::DtVarjoProvider::myDriverHandle
protected

store a handle to the driver to avoid repeated lookup


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

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)