VR-Engage  2.2
Loading...
Searching...
No Matches
DtOsgSensorViewRecOverlaySection Class Reference

Detailed Description

DtOsgSensorViewRecOverlaySection provides a sensor view overlay that displays recording status information. When recording is active, it shows a "REC" indicator in the upper left corner of the sensor view, typically in red text to indicate the recording state. The overlay is designed to be easily visible without obstructing important sensor information.

#include <osgSensorViewRecOverlaySection.h>

Inheritance diagram for DtOsgSensorViewRecOverlaySection:
[legend]

Public Member Functions

virtual ~DtOsgSensorViewRecOverlaySection () override
 
virtual void initialize (makVrv::DtOverlayRenderer &overlayRenderer, unsigned int channelWidth, unsigned int channelHeight, unsigned int channelXOffset, unsigned int channelYOffset) override
 
virtual void setChannelSize (unsigned int channelWidth, unsigned int channelHeight, unsigned int channelXOffset, unsigned int channelYOffset) override
 
virtual void update (const makVrv::DtOsgObserverObject &observer, const makVrv::DtSensorFieldOfViewData &state) override
 
virtual const std::string & sectionName () const override
 

Static Public Attributes

static const std::string SectionName
 

Protected Member Functions

 DtOsgSensorViewRecOverlaySection (makVrv::DtDe &de)
 

Protected Attributes

makVrv::DtTextProxy * myText
 

Private Attributes

const double TextHorizLocation = 0.02
 
const double TextVertLocation = 0.95
 
const double DefaultFontSize = 12
 
const double TextBoxWidth = 0.3
 
const double TextBoxHeight = 0.3
 

Friends

class DtOsgSensorViewRecOverlaySectionCreator
 

Constructor & Destructor Documentation

◆ ~DtOsgSensorViewRecOverlaySection()

virtual DtOsgSensorViewRecOverlaySection::~DtOsgSensorViewRecOverlaySection ( )
overridevirtual

Destructor.

Cleans up resources used by the recording status overlay section, particularly the text display objects.

◆ DtOsgSensorViewRecOverlaySection()

DtOsgSensorViewRecOverlaySection::DtOsgSensorViewRecOverlaySection ( makVrv::DtDe & de)
inlineprotected

Protected constructor.

Parameters
deReference to the display engine

Creates a new recording status overlay section. This constructor is protected because instances should only be created through the creator class.

References de(), and myText.

Member Function Documentation

◆ initialize()

virtual void DtOsgSensorViewRecOverlaySection::initialize ( makVrv::DtOverlayRenderer & overlayRenderer,
unsigned int channelWidth,
unsigned int channelHeight,
unsigned int channelXOffset,
unsigned int channelYOffset )
overridevirtual

Initializes the overlay section.

Parameters
overlayRendererRenderer for creating overlay elements
channelWidthWidth of the channel in pixels
channelHeightHeight of the channel in pixels
channelXOffsetX offset of the channel in pixels
channelYOffsetY offset of the channel in pixels

Initializes the overlay section by creating the text element that displays the recording status. This must be called prior to any update calls. The position of the text is calculated based on the channel dimensions and offsets.

◆ setChannelSize()

virtual void DtOsgSensorViewRecOverlaySection::setChannelSize ( unsigned int channelWidth,
unsigned int channelHeight,
unsigned int channelXOffset,
unsigned int channelYOffset )
overridevirtual

Updates the overlay when the channel size changes.

Parameters
channelWidthNew width of the channel in pixels
channelHeightNew height of the channel in pixels
channelXOffsetNew X offset of the channel in pixels
channelYOffsetNew Y offset of the channel in pixels

Adjusts the position and size of the text element when the channel dimensions or position change. This ensures the recording status display maintains its relative position in the view.

◆ update()

virtual void DtOsgSensorViewRecOverlaySection::update ( const makVrv::DtOsgObserverObject & observer,
const makVrv::DtSensorFieldOfViewData & state )
overridevirtual

Updates the recording status display.

Parameters
observerObserver object representing the viewer's position and orientation
stateCurrent state of the sensor field of view

Updates the overlay text based on the current recording status. If recording is active, the "REC" indicator is displayed; otherwise, it is hidden. This method is called once per frame to keep the display synchronized with the actual recording state.

◆ sectionName()

virtual const std::string & DtOsgSensorViewRecOverlaySection::sectionName ( ) const
overridevirtual

Gets the unique name of this overlay section.

Returns
Reference to the section name string

Returns the name of this section with which it may be retrieved from the DtOsgSensorViewOverlay. Each section type has a unique name.

Friends And Related Symbol Documentation

◆ DtOsgSensorViewRecOverlaySectionCreator

Friend declaration for creator class.

Only the creator class can construct instances of this section.

References DtOsgSensorViewRecOverlaySectionCreator.

Referenced by DtOsgSensorViewRecOverlaySectionCreator.

Member Data Documentation

◆ TextHorizLocation

const double DtOsgSensorViewRecOverlaySection::TextHorizLocation = 0.02
private

Horizontal position of the text as a fraction of display width (0.0-1.0)

Value of 0.02 positions the text near the left edge of the display

◆ TextVertLocation

const double DtOsgSensorViewRecOverlaySection::TextVertLocation = 0.95
private

Vertical position of the text as a fraction of display height (0.0-1.0)

Value of 0.95 positions the text near the top edge of the display

◆ DefaultFontSize

const double DtOsgSensorViewRecOverlaySection::DefaultFontSize = 12
private

Default font size for the recording status text in points.

◆ TextBoxWidth

const double DtOsgSensorViewRecOverlaySection::TextBoxWidth = 0.3
private

Width of the text box as a fraction of display width.

◆ TextBoxHeight

const double DtOsgSensorViewRecOverlaySection::TextBoxHeight = 0.3
private

Height of the text box as a fraction of display height.

◆ SectionName

const std::string DtOsgSensorViewRecOverlaySection::SectionName
static

Static constant defining the section name.

This string identifier is used to register and retrieve this overlay section.

◆ myText

makVrv::DtTextProxy* DtOsgSensorViewRecOverlaySection::myText
protected

Text element displaying the recording status.

Pointer to the text proxy object that renders the recording status text. This is created during initialization and made visible or hidden during each update call based on the current recording state.

Referenced by DtOsgSensorViewRecOverlaySection().


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