LightsprintSDK 2021.08.08
rr_gl::VRDevice Class Referenceabstract

#include <VRDevice.h>

Public Member Functions

 VRDevice ()
 
virtual void getPose (rr::RRVec3 &outPos, rr::RRVec3 &outRot)=0
 
void updateCamera (rr::RRCamera &camera)
 
virtual ~VRDevice ()
 

Public Attributes

float resMultiplier
 

Detailed Description

Common features of VR devices, e.g. positions of controllers.

By creating VR device, your program shows up on HMD and you are expected to start rendering soon. You render simply by adding stereo plugin to plugin chain, which calls either oculus or openvr plugin, depending on your device.

Note that there is no need to expose functions specific for rendering (see how oculus/openvr plugins render).

Constructor & Destructor Documentation

◆ VRDevice()

rr_gl::VRDevice::VRDevice ( )
inline

◆ ~VRDevice()

virtual rr_gl::VRDevice::~VRDevice ( )
inlinevirtual

Releases HMD, so it can be acquired by other programs.

Member Function Documentation

◆ getPose()

virtual void rr_gl::VRDevice::getPose ( rr::RRVec3 outPos,
rr::RRVec3 outRot 
)
pure virtual

Returns HMD position and rotation.

◆ updateCamera()

void rr_gl::VRDevice::updateCamera ( rr::RRCamera camera)

Calls getPose() and updates camera position and rotation accordingly.

It does not change FOV, screenCenter, eyeSeparation. It is less flexible, but simpler alternative to getPose().

Member Data Documentation

◆ resMultiplier

float rr_gl::VRDevice::resMultiplier