|
VR-Engage
2.2
|
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::DtTextureIndexDrawCallback * | postDrawCallback |
| makVrv::DtDe & | myDe |
|
inline |
Constructor.
| de | Reference 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.
| void makVre::DtCameraStruct::viewportChanged | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h ) |
Handles viewport size or position changes.
| x | New x-coordinate of the viewport |
| y | New y-coordinate of the viewport |
| w | New width of the viewport |
| h | New 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.
| 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.
| void makVre::DtCameraStruct::drawCallback | ( | osg::RenderInfo & | renderInfo | ) |
Callback executed during the rendering process.
| renderInfo | Rendering 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.
| DtEntityIdentifier makVre::DtCameraStruct::ownshipId |
Entity identifier of the ownship associated with this camera.
Referenced by DtCameraStruct().
| std::string makVre::DtCameraStruct::name |
Name of this camera.
| DtCameraType makVre::DtCameraStruct::cameraType |
Type of camera (Gimbal, Stealth, PlanView, Panel)
Referenced by DtCameraStruct().
| std::string makVre::DtCameraStruct::windowName |
Name of the window this camera renders to.
Referenced by DtCameraStruct().
| std::string makVre::DtCameraStruct::observerName |
Name of the observer associated with this camera.
Referenced by DtCameraStruct().
| std::string makVre::DtCameraStruct::channelName |
Name of the channel this camera renders to.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::useCount |
Reference count for this camera.
Tracks how many panel displays are using this camera view.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::textureIndex |
Index of the texture in the texture array.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::textureOffsetX |
X-coordinate offset within the texture.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::textureOffsetY |
Y-coordinate offset within the texture.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::textureWidth |
Width of the render texture in pixels.
Referenced by DtCameraStruct().
| int makVre::DtCameraStruct::textureHeight |
Height of the render texture in pixels.
Referenced by DtCameraStruct().
| makVrv::DtCameraNode* makVre::DtCameraStruct::rttCamera |
Camera node used for render-to-texture operations.
Referenced by DtCameraStruct().
| makVrv::DtCameraNode* makVre::DtCameraStruct::overlayCamera |
Camera node used for rendering overlays on top of the main view.
Referenced by DtCameraStruct().
| osg::ref_ptr<osg::Texture2D> makVre::DtCameraStruct::outputTexture |
Reference to the output texture where the camera renders.
Referenced by DtCameraStruct().
| std::string makVre::DtCameraStruct::rttReplaces |
Name of the texture this RTT replaces in the model.
| const makVrv::DtModelDefinition* makVre::DtCameraStruct::modelDef |
Pointer to model definition associated with this camera.
Referenced by DtCameraStruct().
| bool makVre::DtCameraStruct::mipRtt |
Flag indicating whether to generate mipmaps for the render texture.
Referenced by DtCameraStruct().
| bool makVre::DtCameraStruct::rttIsHud |
Flag indicating whether this render texture is for a HUD display.
Referenced by DtCameraStruct().
| makVre::DtTextureIndexDrawCallback* makVre::DtCameraStruct::postDrawCallback |
Callback executed after drawing to handle post-render operations.
Referenced by DtCameraStruct().
| makVrv::DtDe& makVre::DtCameraStruct::myDe |
Reference to the display engine.
Referenced by DtCameraStruct().