Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::ext::vr::Overlay Class Reference

VR Overlay Application. More...

#include <OxygenEngine/ext/vr.h>

Inheritance diagram for oe::ext::vr::Overlay:
[legend]
Collaboration diagram for oe::ext::vr::Overlay:
[legend]

Public Member Functions

 Overlay (const std::string &key, const std::string &name="")
 
void setRatio (const float &width)
 Set Overlay ratio By default the ratio is 1.0, meaning that the sent texture width will equals 1 meter.
 
void useStereoRendering (const bool enable=true)
 Tell overlay to split texture to left/right eye.
 
bool isUsingStereoRendering ()
 Check if stereo rendering is enabled.
 
void handleEvents (oe::core::EventHandler &event_handler, const glm::ivec2 &window_dimensions)
 Handle Overlay events and send them to an event_handler.
 
void submitTexture (const std::shared_ptr< oe::render::Texture > &texture)
 Send texture to the Overlay.
 
void bindToDevice (const std::unique_ptr< TrackedDevice > &device, const glm::mat4 &matrix=glm::mat4(1.0))
 Attach the overlay to a tracked device.
 

Detailed Description

Member Function Documentation

◆ bindToDevice()

void oe::ext::vr::Overlay::bindToDevice ( const std::unique_ptr< TrackedDevice > &  device,
const glm::mat4 &  matrix = glm::mat4(1.0) 
)

Attach the overlay to a tracked device.

Note
if the overlay transform doesn't change, no need to call each time device moves, its handled automatically

◆ setRatio()

void oe::ext::vr::Overlay::setRatio ( const float &  width)

Set Overlay ratio By default the ratio is 1.0, meaning that the sent texture width will equals 1 meter.

Parameters
widthWidth in meters

◆ submitTexture()

void oe::ext::vr::Overlay::submitTexture ( const std::shared_ptr< oe::render::Texture > &  texture)

Send texture to the Overlay.

Note
if stereo rendering is enabled, the Texture is split to left/right eye

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