VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
13 
14 #include <vrvUtil/signalslib.h>
15 
16 namespace makVrv
17 {
18  class DtChannel;
19  class DtDe;
20  class DtMouseEvent;
21  class DtRenderer;
22  class DtOverlayRenderer;
23  class DtOverlayRendererInterface;
24  class DtWidgetPicker;
25  enum class DtModelSetId;
26  struct DtObserverRenderData;
27  struct DtOverlayRenderData;
28 
32  {
33  public:
35  {
36  InvalidOverlay = 0,
45  //Allow 16 user set model sets.
46  ModelSet_UserEnd = ModelSet_UserStart + 16,
48  //Allow for 128 channel specific overlays
49  Channel_SpecificEnd = Channel_SpecificStart + 128,
54  };
55 
56  public:
57 
60 
62  virtual ~DtOverlayManager();
63 
65  DtOverlayManager(const DtOverlayManager&) = delete;
66 
68  DtOverlayManager& operator = (const DtOverlayManager&) = delete;
69 
70  public:
71 
73  virtual void render(DtChannel* channel,
74  const DtOverlayRenderData& overlayRenderData,
75  const DtObserverRenderData& channelRenderData,
76  const double* currentProjectionMatrix) = 0;
77 
79  virtual void releaseResources() = 0;
80 
82  virtual DtOverlayRendererInterface& overlayRenderer(unsigned int layerId) = 0;
83 
86  virtual DtOverlayRendererInterface& overlayRendererEmptyScene(DtChannel* channel) = 0;
87  virtual DtOverlayRendererInterface& overlayRenderer(DtChannel* channel) = 0;
88  virtual DtOverlayRendererInterface& overlayRenderer3D(DtChannel* channel) = 0;
89  virtual DtOverlayRendererInterface& overlayRenderer2DNormalized(DtChannel* channel) = 0;
90 
93  virtual DtOverlayRendererInterface& overlayRenderer(DtChannel* channel, DtModelSetId modelSet) = 0;
94 
95  virtual DtWidgetPicker& widgetPicker(unsigned int layerId) = 0;
96 
99  virtual DtWidgetPicker& widgetPicker(DtChannel* channel) = 0;
100  virtual DtWidgetPicker& widgetPicker3D(DtChannel* channel) = 0;
101  virtual DtWidgetPicker& widgetPicker2DNormalized(DtChannel* channel) = 0;
102 
104  virtual DtWidgetPicker& widgetPicker(DtChannel* channel, DtModelSetId modelSet) = 0;
105 
107  static DefaultOverlays modelSetToOverlay(DtModelSetId modelSet);
108 
109  virtual void enableOverlayOnChannel(unsigned int layerId, bool enabled,
110  DtChannel& channel) = 0;
111 
115  virtual bool handleMouseEvent(const DtMouseEvent& ev,
116  DtChannel& channel) = 0;
117 
119  virtual void destroyOverlayLayer(unsigned int layerId) = 0;
120 
122  virtual bool overlayLayerIsVisible(unsigned int layerId) const = 0;
123 
127  virtual void setOverlayLayerVisibility(unsigned int layerId,
128  bool visible) = 0;
129 
130  boost::signalslib::signal<void (DtChannel* channel, DefaultOverlays overlay)> signal_overlayAboutToBeRendered;
131 
132  };
133 
137  {
138  public:
139 
141  static DtOverlayManagerCreator& instance(DtDe&);
142 
144  static void registerInstance(DtDe& de,DtOverlayManagerCreator*);
145 
147  virtual DtOverlayManager* create(DtDe& de) = 0;
148  };
149 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Definition: DtOverlayManager.h:44
Definition: DtOverlayManager.h:50
Definition: objectSettingsManager.h:50
Definition: DtOverlayManager.h:47
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv::DtVirtualBaseClass class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DefaultOverlays
Definition: DtOverlayManager.h:34
boost::signalslib::signal< void(DtChannel *channel, DefaultOverlays overlay)> signal_overlayAboutToBeRendered
Definition: DtOverlayManager.h:130
Creator class.
Definition: DtOverlayManager.h:136
Abstract base class for managing the overlays.
Definition: DtOverlayManager.h:31
A structure to hold rendering information for overlays. This is used to pass to various overlay rende...
Definition: DtCommonRenderData.h:42
Definition: DtOverlayManager.h:52
Definition: DtOverlayManager.h:38
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
Definition: DtOverlayManager.h:37
DtModelSetId
Definition: DtModelSetEnums.h:19
Definition: DtCommonRenderData.h:32
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)