VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtCameraStruct Struct Reference

Detailed Description

DtCameraStruct manages a camera view used for rendering to texture for an instrument panel display. It holds the configuration for a specific instrument panel camera, including render target settings, texture properties, and the associated OSG cameras. This struct maintains the relationships between the camera view, its output texture, and the display parameters.

#include <instrumentPanelManagerStructs.h>

Public Member Functions

 DtCameraStruct (makVrv::DtDe &de)
 
void viewportChanged (int x, int y, int w, int h)
 
void renderTextureChanged ()
 
void drawCallback (osg::RenderInfo &renderInfo)
 

Public Attributes

DtEntityIdentifier ownshipId
 
std::string name
 
DtCameraType cameraType
 
std::string windowName
 
std::string observerName
 
std::string channelName
 
int useCount
 
int textureIndex
 
int textureOffsetX
 
int textureOffsetY
 
int textureWidth
 
int textureHeight
 
makVrv::DtCameraNode * rttCamera
 
makVrv::DtCameraNode * overlayCamera
 
osg::ref_ptr< osg::Texture2D > outputTexture
 
std::string rttReplaces
 
const makVrv::DtModelDefinition * modelDef
 
bool mipRtt
 
bool rttIsHud
 
makVre::DtTextureIndexDrawCallbackpostDrawCallback
 
makVrv::DtDe & myDe
 

Constructor & Destructor Documentation

◆ DtCameraStruct()

makVre::DtCameraStruct::DtCameraStruct ( makVrv::DtDe & de)
inline

Constructor.

Parameters
deReference to the display engine

Creates a new camera structure with default settings. Initializes all camera properties to their default values and associates the structure with the specified display engine.

References cameraType, channelName, de(), mipRtt, modelDef, myDe, observerName, outputTexture, overlayCamera, ownshipId, postDrawCallback, rttCamera, rttIsHud, textureHeight, textureIndex, textureOffsetX, textureOffsetY, textureWidth, makVre::Uninitialized, useCount, and windowName.

Member Function Documentation

◆ viewportChanged()

void makVre::DtCameraStruct::viewportChanged ( int x,
int y,
int w,
int h )

Handles viewport size or position changes.

Parameters
xNew x-coordinate of the viewport
yNew y-coordinate of the viewport
wNew width of the viewport
hNew height of the viewport

Updates the camera and render-to-texture configuration when the viewport dimensions or position change. This ensures the rendered output matches the new viewport specifications.

◆ renderTextureChanged()

void makVre::DtCameraStruct::renderTextureChanged ( )

Handles changes to the render texture.

Updates the camera and associated objects when the render texture properties change. This ensures all components are properly synchronized to use the updated texture.

◆ drawCallback()

void makVre::DtCameraStruct::drawCallback ( osg::RenderInfo & renderInfo)

Callback executed during the rendering process.

Parameters
renderInfoRendering information from OSG

This callback is executed during the OSG rendering process. It handles any custom rendering operations needed for this camera, such as setting up texture indices or applying post-processing effects.

Member Data Documentation

◆ ownshipId

DtEntityIdentifier makVre::DtCameraStruct::ownshipId

Entity identifier of the ownship associated with this camera.

Referenced by DtCameraStruct().

◆ name

std::string makVre::DtCameraStruct::name

Name of this camera.

◆ cameraType

DtCameraType makVre::DtCameraStruct::cameraType

Type of camera (Gimbal, Stealth, PlanView, Panel)

Referenced by DtCameraStruct().

◆ windowName

std::string makVre::DtCameraStruct::windowName

Name of the window this camera renders to.

Referenced by DtCameraStruct().

◆ observerName

std::string makVre::DtCameraStruct::observerName

Name of the observer associated with this camera.

Referenced by DtCameraStruct().

◆ channelName

std::string makVre::DtCameraStruct::channelName

Name of the channel this camera renders to.

Referenced by DtCameraStruct().

◆ useCount

int makVre::DtCameraStruct::useCount

Reference count for this camera.

Tracks how many panel displays are using this camera view.

Referenced by DtCameraStruct().

◆ textureIndex

int makVre::DtCameraStruct::textureIndex

Index of the texture in the texture array.

Referenced by DtCameraStruct().

◆ textureOffsetX

int makVre::DtCameraStruct::textureOffsetX

X-coordinate offset within the texture.

Referenced by DtCameraStruct().

◆ textureOffsetY

int makVre::DtCameraStruct::textureOffsetY

Y-coordinate offset within the texture.

Referenced by DtCameraStruct().

◆ textureWidth

int makVre::DtCameraStruct::textureWidth

Width of the render texture in pixels.

Referenced by DtCameraStruct().

◆ textureHeight

int makVre::DtCameraStruct::textureHeight

Height of the render texture in pixels.

Referenced by DtCameraStruct().

◆ rttCamera

makVrv::DtCameraNode* makVre::DtCameraStruct::rttCamera

Camera node used for render-to-texture operations.

Referenced by DtCameraStruct().

◆ overlayCamera

makVrv::DtCameraNode* makVre::DtCameraStruct::overlayCamera

Camera node used for rendering overlays on top of the main view.

Referenced by DtCameraStruct().

◆ outputTexture

osg::ref_ptr<osg::Texture2D> makVre::DtCameraStruct::outputTexture

Reference to the output texture where the camera renders.

Referenced by DtCameraStruct().

◆ rttReplaces

std::string makVre::DtCameraStruct::rttReplaces

Name of the texture this RTT replaces in the model.

◆ modelDef

const makVrv::DtModelDefinition* makVre::DtCameraStruct::modelDef

Pointer to model definition associated with this camera.

Referenced by DtCameraStruct().

◆ mipRtt

bool makVre::DtCameraStruct::mipRtt

Flag indicating whether to generate mipmaps for the render texture.

Referenced by DtCameraStruct().

◆ rttIsHud

bool makVre::DtCameraStruct::rttIsHud

Flag indicating whether this render texture is for a HUD display.

Referenced by DtCameraStruct().

◆ postDrawCallback

makVre::DtTextureIndexDrawCallback* makVre::DtCameraStruct::postDrawCallback

Callback executed after drawing to handle post-render operations.

Referenced by DtCameraStruct().

◆ myDe

makVrv::DtDe& makVre::DtCameraStruct::myDe

Reference to the display engine.

Referenced by DtCameraStruct().


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