|
VR-Engage
2.2
|
This class manages the rendering of all debug visuals in the VREngage environment. It handles layers, visibility controls, and integration with the graphics engine.
#include <debugRenderer.h>
Classes | |
| struct | DrawLayer |
Public Member Functions | |
| DtDebugRenderer (makVrv::DtDe &de) | |
| virtual | ~DtDebugRenderer () |
| virtual bool | render (void *context, DtDebugRenderParameters ¶ms) |
| virtual bool | isEnabled () |
| virtual void | setEnabled (bool setting) |
| virtual std::vector< std::pair< std::string, std::string > > | layerNames (double timeoutTime=0.f, const std::string &group="") |
| virtual void | setLayerEnabled (const std::string &layerName, bool setting) |
| virtual bool | isLayerEnabled (const std::string &layerName) |
| virtual void | debugCallback () |
| float | getRenderTimeout () |
| void | setRenderTimeout (float timeout) |
Protected Types | |
| using | DrawLayerMap = std::map<std::string, DrawLayer> |
| using | DrawLayerMapIter = DrawLayerMap::iterator |
| using | CanvasMap = std::map<std::pair<void*, bool>, DtDebugCanvas*> |
Protected Member Functions | |
| void | addDrawCmd (const std::string &layerId, const std::string &layerName, DtDebugDrawCommand *cmd) |
| virtual makVre::DtVreMessageResult | handleDrawSphere (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawLine (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawCube (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawTris (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawText3d (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawText2d (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawGraph (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleDrawTextPanel (makVre::DtVreMessage *msg) |
Protected Attributes | |
| friend | DtVreDebugManager |
| makVrv::DtDe & | myDe |
| float | myMainScreenHeight |
| float | myMainScreenWidth |
| float | myDebugMenuTimeout |
| DrawLayerMap | myDrawLayerMap |
| bool | myIsEnabled |
| CanvasMap | myCanvasMap |
| osg::ref_ptr< osg::Drawable > | my2dDrawable |
| osg::ref_ptr< osg::Drawable > | my3dDrawable |
| DtFilename | myFontFilename |
| DtFilename | myVsFilename |
| DtFilename | myFsFilename |
|
protected |
Map of layer IDs to layer data.
|
protected |
Iterator for the draw layer map.
|
protected |
Map of canvases for different rendering contexts.
| makVre::DtDebugRenderer::DtDebugRenderer | ( | makVrv::DtDe & | de | ) |
|
virtual |
Virtual destructor.
|
virtual |
Main rendering function for debug visuals.
| context | Graphics context for rendering |
| params | Rendering parameters including view and projection matrices |
|
virtual |
Checks if debug rendering is enabled.
|
virtual |
Enables or disables debug rendering.
| setting | True to enable debug rendering, false to disable |
|
virtual |
Gets the names of all available debug layers.
| timeoutTime | Timeout in seconds to filter inactive layers |
| group | Group name to filter layers by |
|
virtual |
Enables or disables a specific debug layer.
| layerName | Name of the layer to modify |
| setting | True to enable the layer, false to disable |
|
virtual |
Checks if a specific debug layer is enabled.
| layerName | Name of the layer to check |
|
virtual |
Debug callback function.
Called to trigger any debug-specific processing
| float makVre::DtDebugRenderer::getRenderTimeout | ( | ) |
Gets the render timeout value.
| void makVre::DtDebugRenderer::setRenderTimeout | ( | float | timeout | ) |
Sets the render timeout value.
| timeout | Timeout value in seconds |
|
protected |
Adds a draw command to a specific layer.
| layerId | ID of the layer |
| layerName | Display name of the layer |
| cmd | Pointer to the draw command to add |
|
protectedvirtual |
Handles sphere drawing messages.
| msg | Pointer to the message containing sphere drawing parameters |
|
protectedvirtual |
Handles line drawing messages.
| msg | Pointer to the message containing line drawing parameters |
|
protectedvirtual |
Handles cube drawing messages.
| msg | Pointer to the message containing cube drawing parameters |
|
protectedvirtual |
Handles triangle drawing messages.
| msg | Pointer to the message containing triangle drawing parameters |
|
protectedvirtual |
Handles 3D text drawing messages.
| msg | Pointer to the message containing 3D text drawing parameters |
|
protectedvirtual |
Handles 2D text drawing messages.
| msg | Pointer to the message containing 2D text drawing parameters |
|
protectedvirtual |
Handles graph drawing messages.
| msg | Pointer to the message containing graph drawing parameters |
|
protectedvirtual |
Handles text panel drawing messages.
| msg | Pointer to the message containing text panel drawing parameters |
|
protected |
|
protected |
Reference to the graphics engine.
|
protected |
Main screen height in pixels.
|
protected |
Main screen width in pixels.
|
protected |
Timeout for debug menu visibility.
|
protected |
Map of all debug layers.
|
protected |
Flag indicating if debug rendering is enabled.
|
protected |
Map of all debug canvases.
|
protected |
2D drawable for rendering debug elements
|
protected |
3D drawable for rendering debug elements
|
protected |
Font filename for text rendering.
|
protected |
Vertex shader filename.
|
protected |
Fragment shader filename.