VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayPolygonModel.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtPolygonModel.h>
16 
17 #include <vrvUtil/DtUnicode.h>
18 
19 #include <matrix/vlVector.h>
20 
21 #include <vector>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtChannelManager;
27  class DtChannel;
28  class DtChannelConfiguration;
29  class DtModelDefinition;
30 
34  {
35  public:
36  using DtPerimeterWrappedTextCollection = std::vector<DtUnicode>;
37 
38  public:
41 
43  virtual ~DtOverlayPolygonModel();
44 
45  //@name Distributed Interface
47 
49  virtual void setColor(float r, float g, float b, float a);
50 
52  virtual void setInsideColor(float r, float g, float b, float a);
53 
55  virtual void getInsideColor(float& r, float& g, float& b, float& a);
56 
58  virtual void setOutsideColor(float r, float g, float b, float a);
59 
61  virtual void getOutsideColor(float& r, float& g, float& b, float& a);
62 
64  virtual void setSolidFillCenter(bool);
65 
67  virtual void setPosition(int vtx, const DtVector& position);
68 
70  virtual void setOrigin(const DtVector& o);
71 
73  virtual void setPoint(int vtx, const DtVector& position);
74 
76  virtual void set2dOffset(int index, float x, float y);
77 
80  virtual void set3dDirection2dLength(int index, float x, float y, float z,
81  float len);
82 
85  virtual void setGroup(int);
86 
88  virtual void setOrientation(int vtx, const DtTaitBryan& orientation);
89 
91  virtual void setTexturePath(const std::string& texturePath);
92 
95  virtual void setIsStippleUsedForFill(bool isStippleUsedForFill);
96 
100  virtual void setIsTextureFillFittedToAreaEnabled(bool isTextureFillFittedToAreaEnabled);
101 
106  virtual void setOutlineTexture(const std::string& texturePath, int width = -1, int height = -1);
107 
109  virtual void setNumTextureTiles(double numTiles);
110 
112  virtual void setSolid(bool solid);
113 
117  virtual void setIsSupportModel(bool isSupport);
118 
121  virtual void addPoint(const DtVector& point, int index);
122 
124  virtual void setPickable(bool enabled);
125 
127  virtual void removePoint(int index);
128 
130  virtual void removePosition(int index);
131 
133  virtual void setStipplePattern(unsigned int stipplePattern);
134 
136  virtual const std::vector<DtVector>& points() const;
137 
139  virtual int pointCount() const;
140 
142  virtual DtVector point(int) const;
143 
145  virtual void setWidth(float width);
146 
148  virtual void setEventWidth(float width);
149 
151  virtual void setEventsEnabled(bool);
152 
154  virtual void setVisible(bool isVisible);
156 
157  //@name Local Interface
159 
161  virtual void addToScene(const DtUniqueID& sceneObjectId, DtModelSetId modelSet,
162  int visualizerType);
163 
165  virtual void removeFromScene();
166 
168  virtual void setModelDefinition(const std::string& str);
170 
172  virtual void setFillPattern(const std::vector<unsigned int>&);
173 
179  virtual void setFillPatternFrequency(float frequency);
180 
182  virtual float fillPatternFrequency() const;
183 
186  virtual void setOutline(bool);
187 
189  virtual void setEnableDecalProjector(bool enable);
190 
192  virtual bool enableDecalProjector() const;
193 
195 
198  virtual void setIsPerimeterWrappedTextRenderingEnabled(bool);
199 
203  virtual void setPerimeterWrappedTextCollection(const DtPerimeterWrappedTextCollection&);
204 
210  virtual void setPerimeterWrappedTextInterval(int intervalInScreenSpaceCM);
211 
213  virtual void setPerimeterWrappedTextFont(const std::string& fontFile, float fontPointSize);
214 
216  virtual void setPerimeterWrappedTextColor(float r, float g, float b, float a);
217 
219  virtual void setPerimeterWrappedTextBackgroundColor(float r, float g, float b, float a);
221 
223  virtual const DtVector& origin() const;
224 
225  protected:
229  {
230  DtOverlayPolygonModelInstance* channelPolygonModelInstance = nullptr;
231  DtOverlayScreenIntervaledTextInstance* screenTextInstance = nullptr;
232  };
233 
235  virtual void update();
236 
238  virtual void needsUpdate();
239 
243  virtual void moveInstancesFromChannelSpecific();
244 
248  virtual void moveInstancesToChannelSpecific();
249 
252  virtual void slot_channelCreated(DtChannel* channel);
253 
255  virtual void slot_channelDestroyed(DtChannelManager* channelManager, DtChannel* channel);
256 
259  virtual void slot_channelConfigurationModified(const std::string& deName,
260  const std::string& winName, const std::string& oldChannelName,
261  const DtChannelConfiguration& config);
262 
264  virtual void setupInstanceWithCurrentValues(DtOverlayPolygonModelInstance*,
266 
267  protected:
270  DtTaitBryan myRotation;
271 
274 
278 
285 
288 
289  float myPerimeterWrappedTextFontColor[4];
290  float myPerimeterWrappedTextBackgroundColor[4];
292 
293  typedef std::map<DtChannel*, DtPolygonInstanceAndText> ChannelInstances;
295 
297 
301  std::string myModelDefinition;
302  float myInsideColor[4];
303  float myOutsideColor[4];
304  float myWidth;
305  std::string myTexturePath;
306  std::string myOutlineTexture;
309  std::vector<unsigned int> myFillPattern;
311  bool myOutline;
315  unsigned int myStipplePattern;
317  bool mySolid;
318  int myGroup;
322  };
323 }
std::string myModelDefinition
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:301
Struct to hold both the channel specific model instance and screen interval text instance which rende...
Definition: DtOverlayPolygonModel.h:228
bool mySolid
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:317
unsigned int myStipplePattern
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:315
voidpf uLong int origin
Definition: ioapi.h:42
bool myEventsEnabled
Definition: DtOverlayPolygonModel.h:268
float myEventWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:316
Distributed model for drawing polygons with attached vertices.
Definition: DtPolygonModel.h:20
Contains makVrv::DtOverlayScreenIntervaledTextInstance class declaration.
ChannelInstances myChannelInstances
Definition: DtOverlayPolygonModel.h:294
std::string myPerimeterWrappedTextFontFile
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:286
std::string myOutlineTexture
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:306
DtSignalConnectionManager myLifetimeConnections
Definition: DtOverlayPolygonModel.h:272
DtVector myOrigin
Definition: DtOverlayPolygonModel.h:269
DtPerimeterWrappedTextCollection myPerimeterWrappedTextCollection
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:283
int myPerimeterWrappedTextIntervalInScreenSpaceCM
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:284
bool myNeedsUpdate
Definition: DtOverlayPolygonModel.h:296
Class to draw a screen spaced perimeter text on polygons, lines, or other geometry.
Definition: DtOverlayScreenIntervaledTextInstance.h:32
The abstract Channel Class.
Definition: DtChannel.h:35
Contains DtPolygonModel declaration.
float myFillPatternFrequency
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:310
int myOutlineTextureTileHeight
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:308
bool myOutline
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:311
double myNumTextureTiles
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:313
bool myIsPerimeterWrappedTextRenderingEnabled
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:282
float myPerimeterWrappedTextFontPointSize
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:287
int myGroup
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:318
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Contains makVrv::DtOverlayPolygonModelInstance class definition.
std::string myTexturePath
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:305
DtSignalConnectionManager myChannelConnections
Definition: DtOverlayPolygonModel.h:273
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
bool myPickable
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:314
DtTaitBryan myRotation
Definition: DtOverlayPolygonModel.h:270
bool myChannelSpecificMode
Set to true if displaying model instances on a per channel basis. Default is false.
Definition: DtOverlayPolygonModel.h:277
std::vector< unsigned int > myFillPattern
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:309
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
std::map< DtChannel *, DtPolygonInstanceAndText > ChannelInstances
Definition: DtOverlayPolygonModel.h:293
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
std::vector< VertexData > VertexList
Definition: DtOverlayPolygonModelInstance.h:74
int myOutlineTextureTileWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:307
bool mySolidFillCenter
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:312
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
OSG implementation of overlay polygon model.
Definition: DtOverlayPolygonModel.h:33
DtModelSetId
Definition: DtModelSetEnums.h:19
A model instance class which allows the drawing of a polygon (supporting textures) on an overlay...
Definition: DtOverlayPolygonModelInstance.h:53
bool myEnableDecalProjector
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:319
bool myIsTextureFillFittedToAreaEnabled
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:320
Contains DLL export macros.
float myWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:304
std::vector< DtUnicode > DtPerimeterWrappedTextCollection
Definition: DtOverlayPolygonModel.h:36

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)