NDEVR
API Documentation
CameraBackground

Logic for rendering the background to a 3D user view. More...

Collaboration diagram for CameraBackground:
[legend]

Public Member Functions

 CameraBackground ()
 Constructs a CameraBackground with default values.
fltp08 mainGridSize () const
 Calculates the effective main grid size based on the current view parameters.
void setSkybox (Skybox *skybox)
 Sets the skybox to use for the background environment rendering.
Skyboxskybox ()
 Returns the currently assigned skybox.
void update (const void *lock_ptr=nullptr)
 Updates the background rendering state, applying any pending changes.

Public Attributes

RGBColor background_color
 The solid background color used when no skybox is active.
fltp08 fixed_grid_size
 A user-specified fixed grid size, overriding automatic calculation when set.
fltp08 grid_size
 The spacing between grid lines in scene units.
fltp08 ortho_ratio
 The ratio used for orthographic projection scaling.
Vector< 2, fltp08orthographic_fov
 The orthographic field of view dimensions (width, height).
bool show_environment
 Whether to render the environment (skybox or ambient background).
bool show_grid
 Whether to render the reference grid in the background.
RGBColor sun_color
 The color of the sun light source.
Vector< 3, fltp04sun_location
 The 3D position of the sun light source in the scene.

Protected Attributes

RGBColor m_current_background_color
 Cached current background color for change detection.
fltp08 m_current_grid_size
 Cached current grid size for change detection.
bool m_current_show_environment
 Cached state of whether the environment is currently shown.
bool m_current_show_grid
 Cached state of whether the grid is currently shown.
bool m_current_show_skybox
 Cached state of whether the skybox is currently shown.
Matrix< fltp08m_current_transform
 The cached current view transform matrix.
Skyboxm_skybox
 The currently assigned skybox for environment rendering.

Detailed Description

Logic for rendering the background to a 3D user view.


This may be in the form of a grid, skybox or simple color.

Definition at line 46 of file CameraBackground.h.

Member Function Documentation

◆ mainGridSize()

fltp08 CameraBackground::mainGridSize ( ) const

Calculates the effective main grid size based on the current view parameters.

Returns
The computed main grid size as a double-precision floating point value.

◆ setSkybox()

void CameraBackground::setSkybox ( Skybox * skybox)

Sets the skybox to use for the background environment rendering.

Parameters
[in]skyboxPointer to the Skybox object to assign.

References skybox().

◆ skybox()

Skybox * CameraBackground::skybox ( )

Returns the currently assigned skybox.

Returns
A pointer to the Skybox object, or nullptr if none is set.

Referenced by setSkybox().

◆ update()

void CameraBackground::update ( const void * lock_ptr = nullptr)

Updates the background rendering state, applying any pending changes.

Parameters
[in]lock_ptrOptional pointer used for synchronization locking. Defaults to nullptr.

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