NDEVR
API Documentation
RasterCameraRenderer

An OpenGL window that renders raster camera video frames with rotation, zoom, and infrared support. More...

Public Member Functions

 RasterCameraRenderer (const String &id)
 Construct a renderer for the camera feed with the given connection ID.
Bounds< 2, sint04adjustRatio (const Bounds< 2, sint04 > &bounds, const Vector< 2, sint04 > &size)
 Adjust a viewport rectangle to maintain the camera aspect ratio.
Angle< sint04rotation () const
 Get the current rotation angle.
void setBackgroundColor (QColor color)
 Set the background color behind the camera frame.
void setInfrared (bool infrared)
 Toggle infrared display mode.
void setRotation (const Angle< sint04 > &rotation)
 Set the rotation angle applied to the displayed camera frame.

Protected Member Functions

void initializeGL () override
 Initialize OpenGL state and shaders.
void onFrameUpdated (const String &id)
 Slot called when a new frame is available for the given feed.
void paintGL () override
 Render the current camera frame to the OpenGL surface.
void resizeGL (int w, int h) override
 Handle window resize by updating the viewport.

Detailed Description

An OpenGL window that renders raster camera video frames with rotation, zoom, and infrared support.


Used to display live camera feeds from raster-based point scanners.

Definition at line 15 of file RasterCameraRenderer.h.

Constructor & Destructor Documentation

◆ RasterCameraRenderer()

RasterCameraRenderer::RasterCameraRenderer ( const String & id)

Construct a renderer for the camera feed with the given connection ID.

Parameters
[in]idThe camera feed identifier.

Member Function Documentation

◆ adjustRatio()

Bounds< 2, sint04 > RasterCameraRenderer::adjustRatio ( const Bounds< 2, sint04 > & bounds,
const Vector< 2, sint04 > & size )

Adjust a viewport rectangle to maintain the camera aspect ratio.

Parameters
[in]boundsThe original viewport bounds.
[in]sizeThe target window size.
Returns
The adjusted bounds preserving the aspect ratio.

◆ onFrameUpdated()

void RasterCameraRenderer::onFrameUpdated ( const String & id)
protected

Slot called when a new frame is available for the given feed.

Parameters
[in]idThe camera feed identifier that was updated.

◆ resizeGL()

void RasterCameraRenderer::resizeGL ( int w,
int h )
overrideprotected

Handle window resize by updating the viewport.

Parameters
[in]wNew width in pixels.
[in]hNew height in pixels.

◆ rotation()

Angle< sint04 > RasterCameraRenderer::rotation ( ) const
inline

Get the current rotation angle.

Returns
The current rotation angle.

Definition at line 35 of file RasterCameraRenderer.h.

Referenced by setRotation().

◆ setBackgroundColor()

void RasterCameraRenderer::setBackgroundColor ( QColor color)
inline

Set the background color behind the camera frame.

Parameters
[in]colorThe background color.

Definition at line 29 of file RasterCameraRenderer.h.

◆ setInfrared()

void RasterCameraRenderer::setInfrared ( bool infrared)

Toggle infrared display mode.

Parameters
[in]infraredTrue to display the infrared stream.

◆ setRotation()

void RasterCameraRenderer::setRotation ( const Angle< sint04 > & rotation)

Set the rotation angle applied to the displayed camera frame.

Parameters
[in]rotationThe rotation angle.

References rotation().


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