v2.0.0
Loading...
Searching...
No Matches
VideoOverlay Class Reference

Camera-facing textured quad rendered at a focus point in the 3-D scene. More...

#include <videooverlay.h>

Public Member Functions

 VideoOverlay ()=default
bool isEnabled () const
void setEnabled (bool enabled)
QVector3D focusPosition () const
void setFocusPosition (const QVector3D &pos)
float sizeMeters () const
void setSizeMeters (float size)
const QImage & frame () const
bool hasFrame () const
void setFrame (const QImage &image)
quint64 frameGeneration () const
float opacity () const
void setOpacity (float opacity)
QVector3D upHint () const
 Hint direction used as the quad's "up" axis. When set (non-zero), the quad's long edge is perpendicular to this direction instead of using the default world-up billboard.
void setUpHint (const QVector3D &dir)
bool isDepthEnabled () const
void setDepthEnabled (bool enabled)
void setDepthFrame (const QImage &image)
const QImage & depthFrame () const
bool hasDepthFrame () const
quint64 depthFrameGeneration () const
float depthScale () const
void setDepthScale (float scale)
int depthSteps () const
void setDepthSteps (int steps)

Detailed Description

Camera-facing textured quad rendered at a focus point in the 3-D scene.

The overlay displays any live RGB/video frame "as a small cut-out view" on top of the 3-D scene. It is a billboarded square positioned at focusPosition with side length sizeMeters, textured with the latest video frame.

This class is a passive data holder: BrainRenderer owns the GPU resources (vertex buffer, texture, sampler, pipeline) and reads from here each frame.

Definition at line 52 of file videooverlay.h.

Constructor & Destructor Documentation

◆ VideoOverlay()

Member Function Documentation

◆ depthFrame()

const QImage & DISP3DLIB::VideoOverlay::depthFrame ( ) const
inline

Definition at line 111 of file videooverlay.h.

◆ depthFrameGeneration()

Definition at line 113 of file videooverlay.h.

◆ depthScale()

float DISP3DLIB::VideoOverlay::depthScale ( ) const
inline
Returns
POM displacement scale in UV space [0..1].

Definition at line 116 of file videooverlay.h.

◆ depthSteps()

Returns
Number of POM ray-march steps (quality vs. performance).

Definition at line 120 of file videooverlay.h.

◆ focusPosition()

QVector3D DISP3DLIB::VideoOverlay::focusPosition ( ) const
inline
Returns
World-space centre of the overlay quad (metres).

Definition at line 61 of file videooverlay.h.

◆ frame()

const QImage & DISP3DLIB::VideoOverlay::frame ( ) const
inline
Returns
Latest video frame (CPU-side). Empty until a frame arrives.

Definition at line 69 of file videooverlay.h.

◆ frameGeneration()

quint64 DISP3DLIB::VideoOverlay::frameGeneration ( ) const
inline

Monotonic counter, incremented on every setFrame() call.

Definition at line 82 of file videooverlay.h.

◆ hasDepthFrame()

Definition at line 112 of file videooverlay.h.

◆ hasFrame()

bool DISP3DLIB::VideoOverlay::hasFrame ( ) const
inline

Definition at line 70 of file videooverlay.h.

◆ isDepthEnabled()

Returns
Whether depth-based parallax relief is enabled.

Definition at line 99 of file videooverlay.h.

◆ isEnabled()

bool DISP3DLIB::VideoOverlay::isEnabled ( ) const
inline

Definition at line 57 of file videooverlay.h.

◆ opacity()

float DISP3DLIB::VideoOverlay::opacity ( ) const
inline
Returns
Overall opacity of the overlay [0..1].

Definition at line 85 of file videooverlay.h.

◆ setDepthEnabled()

void DISP3DLIB::VideoOverlay::setDepthEnabled ( bool enabled)
inline

Definition at line 100 of file videooverlay.h.

◆ setDepthFrame()

void DISP3DLIB::VideoOverlay::setDepthFrame ( const QImage & image)
inline

Push a new monocular depth map (single-channel or RGBA grayscale).

Definition at line 103 of file videooverlay.h.

◆ setDepthScale()

void DISP3DLIB::VideoOverlay::setDepthScale ( float scale)
inline

Definition at line 117 of file videooverlay.h.

◆ setDepthSteps()

void DISP3DLIB::VideoOverlay::setDepthSteps ( int steps)
inline

Definition at line 121 of file videooverlay.h.

◆ setEnabled()

void DISP3DLIB::VideoOverlay::setEnabled ( bool enabled)
inline

Definition at line 58 of file videooverlay.h.

◆ setFocusPosition()

void DISP3DLIB::VideoOverlay::setFocusPosition ( const QVector3D & pos)
inline

Definition at line 62 of file videooverlay.h.

◆ setFrame()

void DISP3DLIB::VideoOverlay::setFrame ( const QImage & image)
inline

Push a new video frame; bumps the generation counter so the GPU re-uploads.

Definition at line 73 of file videooverlay.h.

◆ setOpacity()

void DISP3DLIB::VideoOverlay::setOpacity ( float opacity)
inline

Definition at line 86 of file videooverlay.h.

◆ setSizeMeters()

void DISP3DLIB::VideoOverlay::setSizeMeters ( float size)
inline

Definition at line 66 of file videooverlay.h.

◆ setUpHint()

void DISP3DLIB::VideoOverlay::setUpHint ( const QVector3D & dir)
inline

Definition at line 94 of file videooverlay.h.

◆ sizeMeters()

float DISP3DLIB::VideoOverlay::sizeMeters ( ) const
inline
Returns
Side length of the overlay quad (metres).

Definition at line 65 of file videooverlay.h.

◆ upHint()

QVector3D DISP3DLIB::VideoOverlay::upHint ( ) const
inline

Hint direction used as the quad's "up" axis. When set (non-zero), the quad's long edge is perpendicular to this direction instead of using the default world-up billboard.

Definition at line 93 of file videooverlay.h.


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