VR-Engage  2.2
Loading...
Searching...
No Matches
DtGlStudioInstrumentPanelBuilderRtt.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file DtGlStudioInstrumentPanelBuilderRtt.h
7//! \brief Contains makVrv::DtGlStudioInstrumentPanelBuilderRtt class for render-to-texture instrument panels
8//! \ingroup vrvGlStudioShared
9//!
10//! This file defines a specialized instrument panel builder that creates render-to-texture
11//! channels for instrument panels. This allows instrument panels to be rendered to a
12//! texture and then displayed on other surfaces or in separate viewports, providing
13//! better performance and flexibility than traditional instrument panel rendering.
14
15
16#pragma once
17
18#include "export.h"
19
20#include <vrvGlStudioShared/DtGlStudioInstrumentPanelBuilder.h>
21
22namespace makVrv
23{
24//! Forward declaration of the display engine class
25class DtDe;
26
27//! \brief Specialized instrument panel builder that creates render-to-texture channels
28//!
29//! This class extends DtGlStudioInstrumentPanelBuilder to create instrument panels
30//! that render to textures rather than directly to the screen. This allows instrument
31//! panels to be displayed on other surfaces or in separate viewports, improving
32//! performance and flexibility. It sets up observers, channels, and rendering
33//! configurations to properly display instrument panels for selected objects.
34//! \ingroup vrvGlStudioShared
35class PLAYERSTATION_DLL DtGlStudioInstrumentPanelBuilderRtt : public DtGlStudioInstrumentPanelBuilder
36{
37public:
38 //! Allow the creator class access to protected members
40
41 //! \brief Constructor that initializes the builder with a display engine
42 //! \param de Reference to the display engine to use for creating components
43 //!
44 //! Initializes the base class with the display engine reference.
46
47 //! \brief Virtual destructor for proper cleanup
49
50 //! \brief Creates an inset view for the currently selected object
51 //!
52 //! Creates an observer configuration, sets up a channel with specific viewport
53 //! settings, and configures it as a render-to-texture channel. The channel is
54 //! created for the currently selected object and attaches an observer to it.
55 //! The channel is configured based on the model definition parameters and
56 //! is set to render to a texture rather than directly to the screen.
57 virtual void createInsetView() override;
58
59 //! \brief Gets the name of the created channel
60 //! \return String containing the channel name
61 //!
62 //! Returns the name of the channel created by the createInsetView() method.
63 //! The name is composed of the display name of the selected object and the
64 //! name of the model definition.
65 virtual std::string channelName() const;
66
67 //! \brief Gets the name of the created observer (commented out in current version)
68 //! \return String containing the observer name
69 //!
70 //! This method is commented out in the current implementation.
71 // virtual std::string observerName() const;
72
73protected:
74 //! \brief Name of the channel created by createInsetView()
75 //!
76 //! This is set by createInsetView() and returned by channelName().
77 //! The name is composed of the display name of the selected object and the
78 //! name of the model definition.
79 std::string myChannelName;
80
81 //! \brief Name of the observer created by createInsetView() (commented out)
82 //!
83 //! This member is commented out in the current implementation.
84 // std::string myObserverName;
85};
86
87//! \brief Creator class for DtGlStudioInstrumentPanelBuilderRtt instances
88//!
89//! This creator class is used to create instances of DtGlStudioInstrumentPanelBuilderRtt.
90//! It can be registered with the appropriate factory to make render-to-texture
91//! instrument panels available in the application.
92//! \ingroup vrvGlStudioShared
93class PLAYERSTATION_DLL DtGlStudioInstrumentPanelBuilderRttCreator : public DtGlStudioInstrumentPanelBuilderCreator
94{
95public:
96 //! \brief Creates a new DtGlStudioInstrumentPanelBuilderRtt instance
97 //! \param de Reference to the display engine to use
98 //! \return Pointer to a new DtGlStudioInstrumentPanelBuilderRtt instance
99 //!
100 //! Creates and returns a new DtGlStudioInstrumentPanelBuilderRtt instance
101 //! that uses the specified display engine. The caller takes ownership
102 //! of the returned pointer and is responsible for deleting it.
103 virtual DtInstrumentPanelBuilder* create(DtDe& de) override;
104};
105} // namespace makVrv
Creator class for DtGlStudioInstrumentPanelBuilderRtt instances.
Definition DtGlStudioInstrumentPanelBuilderRtt.h:94
virtual DtInstrumentPanelBuilder * create(DtDe &de) override
Creates a new DtGlStudioInstrumentPanelBuilderRtt instance.
std::string myChannelName
Gets the name of the created observer (commented out in current version)
Definition DtGlStudioInstrumentPanelBuilderRtt.h:79
virtual void createInsetView() override
Creates an inset view for the currently selected object.
friend class DtGlStudioInstrumentPanelBuilderRttCreator
Allow the creator class access to protected members.
Definition DtGlStudioInstrumentPanelBuilderRtt.h:39
DtGlStudioInstrumentPanelBuilderRtt(DtDe &de)
Constructor that initializes the builder with a display engine.
virtual ~DtGlStudioInstrumentPanelBuilderRtt() override
Virtual destructor for proper cleanup.
virtual std::string channelName() const
Gets the name of the created channel.
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.