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 
96  virtual void setIsTextureFillFittedToAreaEnabled(bool isTextureFillFittedToAreaEnabled);
97 
102  virtual void setOutlineTexture(const std::string& texturePath, int width = -1, int height = -1);
103 
105  virtual void setNumTextureTiles(double numTiles);
106 
108  virtual void setSolid(bool solid);
109 
113  virtual void setIsSupportModel(bool isSupport);
114 
117  virtual void addPoint(const DtVector& point, int index);
118 
120  virtual void setPickable(bool enabled);
121 
123  virtual void removePoint(int index);
124 
126  virtual void removePosition(int index);
127 
129  virtual void setStipplePattern(unsigned int stipplePattern);
130 
132  virtual const std::vector<DtVector>& points() const;
133 
135  virtual int pointCount() const;
136 
138  virtual DtVector point(int) const;
139 
141  virtual void setWidth(float width);
142 
144  virtual void setEventWidth(float width);
145 
147  virtual void setEventsEnabled(bool);
148 
150  virtual void setVisible(bool isVisible);
152 
153  //@name Local Interface
155 
157  virtual void addToScene(const DtUniqueID& sceneObjectId, DtModelSetId modelSet,
158  int visualizerType);
159 
161  virtual void removeFromScene();
162 
164  virtual void setModelDefinition(const std::string& str);
166 
168  virtual void setFillPattern(const std::vector<unsigned int>&);
169 
175  virtual void setFillPatternFrequency(float frequency);
176 
178  virtual float fillPatternFrequency() const;
179 
182  virtual void setOutline(bool);
183 
185  virtual void setEnableDecalProjector(bool enable);
186 
188  virtual bool enableDecalProjector() const;
189 
191 
194  virtual void setIsPerimeterWrappedTextRenderingEnabled(bool);
195 
199  virtual void setPerimeterWrappedTextCollection(const DtPerimeterWrappedTextCollection&);
200 
206  virtual void setPerimeterWrappedTextInterval(int intervalInScreenSpaceCM);
207 
209  virtual void setPerimeterWrappedTextFont(const std::string& fontFile, float fontPointSize);
210 
212  virtual void setPerimeterWrappedTextColor(float r, float g, float b, float a);
213 
215  virtual void setPerimeterWrappedTextBackgroundColor(float r, float g, float b, float a);
217 
219  virtual const DtVector& origin() const;
220 
221  protected:
225  {
226  DtOverlayPolygonModelInstance* channelPolygonModelInstance = nullptr;
227  DtOverlayScreenIntervaledTextInstance* screenTextInstance = nullptr;
228  };
229 
231  virtual void update();
232 
234  virtual void needsUpdate();
235 
239  virtual void moveInstancesFromChannelSpecific();
240 
244  virtual void moveInstancesToChannelSpecific();
245 
248  virtual void slot_channelCreated(DtChannel* channel);
249 
251  virtual void slot_channelDestroyed(DtChannelManager* channelManager, DtChannel* channel);
252 
255  virtual void slot_channelConfigurationModified(const std::string& deName,
256  const std::string& winName, const std::string& oldChannelName,
257  const DtChannelConfiguration& config);
258 
260  virtual void setupInstanceWithCurrentValues(DtOverlayPolygonModelInstance*,
262 
263  protected:
265  DtVector myOrigin;
266  DtTaitBryan myRotation;
267 
270 
274 
281 
284 
285  float myPerimeterWrappedTextFontColor[4];
286  float myPerimeterWrappedTextBackgroundColor[4];
288 
289  typedef std::map<DtChannel*, DtPolygonInstanceAndText> ChannelInstances;
291 
293 
297  std::string myModelDefinition;
298  float myInsideColor[4];
299  float myOutsideColor[4];
300  float myWidth;
301  std::string myTexturePath;
302  std::string myOutlineTexture;
305  std::vector<unsigned int> myFillPattern;
307  bool myOutline;
311  unsigned int myStipplePattern;
313  bool mySolid;
314  int myGroup;
318  };
319 }
std::string myModelDefinition
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:297
Struct to hold both the channel specific model instance and screen interval text instance which rende...
Definition: DtOverlayPolygonModel.h:224
bool mySolid
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:313
unsigned int myStipplePattern
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:311
voidpf uLong int origin
Definition: ioapi.h:42
bool myEventsEnabled
Definition: DtOverlayPolygonModel.h:264
float myEventWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:312
Distributed model for drawing polygons with attached vertices.
Definition: DtPolygonModel.h:20
Contains makVrv::DtOverlayScreenIntervaledTextInstance class declaration.
ChannelInstances myChannelInstances
Definition: DtOverlayPolygonModel.h:290
std::string myPerimeterWrappedTextFontFile
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:282
std::string myOutlineTexture
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:302
DtSignalConnectionManager myLifetimeConnections
Definition: DtOverlayPolygonModel.h:268
DtVector myOrigin
Definition: DtOverlayPolygonModel.h:265
DtPerimeterWrappedTextCollection myPerimeterWrappedTextCollection
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:279
int myPerimeterWrappedTextIntervalInScreenSpaceCM
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:280
bool myNeedsUpdate
Definition: DtOverlayPolygonModel.h:292
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:306
int myOutlineTextureTileHeight
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:304
bool myOutline
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:307
double myNumTextureTiles
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:309
bool myIsPerimeterWrappedTextRenderingEnabled
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:278
float myPerimeterWrappedTextFontPointSize
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayPolygonModel.h:283
int myGroup
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:314
#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:301
DtSignalConnectionManager myChannelConnections
Definition: DtOverlayPolygonModel.h:269
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:310
DtTaitBryan myRotation
Definition: DtOverlayPolygonModel.h:266
bool myChannelSpecificMode
Set to true if displaying model instances on a per channel basis. Default is false.
Definition: DtOverlayPolygonModel.h:273
std::vector< unsigned int > myFillPattern
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:305
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:289
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:303
bool mySolidFillCenter
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:308
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:76
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:315
bool myIsTextureFillFittedToAreaEnabled
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:316
Contains DLL export macros.
float myWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayPolygonModel.h:300
std::vector< DtUnicode > DtPerimeterWrappedTextCollection
Definition: DtOverlayPolygonModel.h:36

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)