VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayWedgeModel.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 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtModel.h>
14 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vrvMath/DtVector2.h>
18 #include <vrvMath/DtVector3.h>
19 #include <vrvMath/DtVector4.h>
20 
21 #include <matrix/vlDcm.h>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtPolygonInterface;
27  class DtTextureInterface;
28 
67  {
68  public:
69 
72 
74  DtOverlayWedgeModel() = delete;
75 
78 
80  DtOverlayWedgeModel& operator=(const DtOverlayWedgeModel&) = delete;
81 
83  virtual ~DtOverlayWedgeModel();
84  public:
85 
88 
90  // @{
91  virtual void setOrigin(const DtVector& position);
92  virtual DtVector origin() const;
93  // @}
94 
96  // @{
97  virtual void setRelativePosition(double x, double y, double z);
98  virtual DtVector relativePosition() const;
99  // @}
100 
102  virtual void setOrientation(const DtTaitBryan& orientation);
103 
105  // @{
106  virtual void setMaxAngleSegment(double angleSegmentMax);
107  virtual double maxAngleSegment() const;
108  // @}
109 
111  // @{
112  virtual void setRadius(float len);
113  virtual float radius() const;
114  // @}
115 
117  // @{
118  virtual void setScale(float scale);
119  virtual float scale() const;
120  // @}
121 
123  // @{
124  virtual void setVisible(bool isVisible);
125  virtual bool isVisible() const;
126  // @}
127 
129  // @{
130  virtual void setStartAngle(double startAngle);
131  virtual double startAngle() const;
132  // @}
133 
136  // @{
137  virtual void setWedgeSpan(double wedgeSpan);
138  virtual double wedgeSpan() const;
139  // @}
140 
143  // @{
144  virtual void setFill(bool);
145  virtual bool isFill() const;
146  // @}
147 
150  // @{
151  virtual void setOutline(bool);
152  virtual bool isOutline() const;
153  // @}
154 
157  // @{
158  virtual void setSolidFillCenter(bool);
159  virtual bool isSolidFillCenter() const;
160  // @}
161 
163  virtual void setFillPattern(const std::vector<unsigned int>&);
164 
166  // @{
167  virtual void setStipplePattern(unsigned int stipplePattern);
168  virtual unsigned int stipplePattern() const;
169  // @}
170 
172  // @{
173  virtual void setOutlineWidth(float);
174  virtual float outlineWidth() const;
175  // @}
176 
179  virtual void setColor(float r, float g, float b, float a);
180 
183  // @{
184  virtual void setCentralVertexColor(float r, float g, float b, float a);
185  virtual bool getCentralVertexColor(float& r, float& g, float& b, float& a) const;
186  // @}
187 
190  // @{
191  virtual void setInsideColor(float r, float g, float b, float a);
192  virtual bool getInsideColor(float& r, float& g, float& b, float& a) const;
193  // @}
194 
197  // @{
198  virtual void setOutsideColor(float r, float g, float b, float a);
199  virtual bool getOutsideColor(float& r, float& g, float& b, float& a) const;
200  // @}
201 
203  // @{
204  virtual void setEventsEnabled(bool enabled);
205  virtual bool eventsEnabled() const;
206  // @}
207 
212  // @{
213  virtual void setGroup(int groupNum);
214  virtual int group() const;
215  // @}
216 
217 
218  // @name Inherited DtModel methods
219  // @{
220 
222  virtual void setPosition(int vtx, const DtVector& position) override;
223 
226  virtual void setOrientation(int vtx, const DtTaitBryan& orientation) override;
227 
228 
230  virtual void setModelDefinition(const std::string& str) override;
231 
232  // @}
233 
235  virtual void update();
236 
237 
238  protected:
239 
240  // @name Inherited DtModel methods
241  // @{
242 
244  virtual void addToScene(const DtUniqueID& sceneObjectId,
245  DtModelSetId modelSet, int visualizerType) override;
246 
248  virtual void removeFromScene() override;
249 
253  virtual void setIsSupportModel(bool isSupport) override;
254 
255  // @}
256 
258  virtual void needsUpdate();
259 
261  // @{
262  virtual void setGeometry(double angle, double sweep);
263  virtual bool getGeometry(double& angle, double& sweep) const;
264  // @}
265 
267  // @{
268  virtual void setDimensions(float x, float y);
269  virtual bool getDimensions(float& x, float& y) const;
270  // @}
271 
273  // @{
274  virtual void setPosition(const DtVector& position);
275  // @}
276 
278  virtual void updateVertices();
279 
280 
282  virtual void createPolygonIfNecessary();
283 
285  virtual void channelUpdated(const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData&);
286 
288  virtual void updateColors();
289 
291  virtual void set3DVertexPosition(unsigned int index, double x, double y, double z);
292 
294  virtual void set3DCentroidPosition(double x, double y, double z);
295 
297  virtual void set3DPositionAux(double x, double y, double z, float tempPackedCoords[4]);
298 
304  virtual void setTexturePath(const std::string& texturePath);
305 
310  // @{
311  virtual void setOutlineTexture(const std::string& texturePath, int width = -1, int height = -1);
312  // @}
313 
315  virtual void clearGeometry();
316 
318  protected:
319  std::vector<DtVector> myDefinedVertices;
320 
322 
323  double myWedgeSpan;
324  double myStartAngle;
325 
326  boost::signalslib::connection mySignalPostUpdateConnection;
327 
331 
338  float myScale;
339 
340  double myAngle;
341  double mySweep;
342 
345 
346  float myWidth;
348  unsigned long long myUserData;
349 
350  bool myVisible;
351  bool myOutline;
354  unsigned int myStipplePattern;
355  unsigned int myFillPattern[32];
358  int myGroup;
359 
361  };
362 
363 }
bool myOutline
Definition: DtOverlayWedgeModel.h:351
bool myVisible
Definition: DtOverlayWedgeModel.h:350
unsigned long long myUserData
Definition: DtOverlayWedgeModel.h:348
double myWedgeSpan
Definition: DtOverlayWedgeModel.h:323
DtModelSetId myModelSet
Definition: DtOverlayWedgeModel.h:328
2 dimensional vector
double myMaxAngleSegment
Definition: DtOverlayWedgeModel.h:330
voidpf uLong int origin
Definition: ioapi.h:42
bool myPositionSetFlag
Definition: DtOverlayWedgeModel.h:343
Contains makVrv:DtTacticalGraphicModelUpdaterManager.
float myWidth
Definition: DtOverlayWedgeModel.h:346
bool myNeedsUpdate
Definition: DtOverlayWedgeModel.h:321
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
4 dimensional vector
An abstract interface for a polygon primitive.
Definition: DtPolygonInterface.h:21
3 dimensional vector
DtVector2< float > myDimensions
Definition: DtOverlayWedgeModel.h:335
bool myFillPatternSet
Definition: DtOverlayWedgeModel.h:356
Interface class for an Overlay Circular Wedge Model An overlay model is positioned in 3D space and dr...
Definition: DtOverlayWedgeModel.h:66
Structure used to supply data to callback. Provided as structure as contents could change over time...
Definition: DtTacticalGraphicModelUpdaterManager.h:37
DtVector4< float > myOuterColor
Definition: DtOverlayWedgeModel.h:334
boost::signalslib::connection mySignalPostUpdateConnection
Definition: DtOverlayWedgeModel.h:326
bool myFillPolygon
Definition: DtOverlayWedgeModel.h:344
double mySweep
Definition: DtOverlayWedgeModel.h:341
int myGroup
Definition: DtOverlayWedgeModel.h:358
bool myEventsEnabled
Definition: DtOverlayWedgeModel.h:347
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::vector< DtVector > myDefinedVertices
Definition: DtOverlayWedgeModel.h:319
DtVector4< float > myCentralVertexColor
Definition: DtOverlayWedgeModel.h:332
unsigned int myStipplePattern
Definition: DtOverlayWedgeModel.h:354
DtVector3< double > myPosition
Definition: DtOverlayWedgeModel.h:337
DtVector4< float > myInnerColor
Definition: DtOverlayWedgeModel.h:333
DtPolygonInterface * myPolygon
Definition: DtOverlayWedgeModel.h:352
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtModel class.
DtPolygonInterface * myOutlinePolygon
Definition: DtOverlayWedgeModel.h:353
float myScale
Definition: DtOverlayWedgeModel.h:338
DtVector3< double > myRelativePosition
Definition: DtOverlayWedgeModel.h:336
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
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
DtTextureInterface * myOutlineTexture
Definition: DtOverlayWedgeModel.h:360
DtModelSetId
Definition: DtModelSetEnums.h:19
double myAngle
Definition: DtOverlayWedgeModel.h:340
DtDcm myOrientationDcm
Definition: DtOverlayWedgeModel.h:329
bool mySolidFillCenter
Definition: DtOverlayWedgeModel.h:357
double myStartAngle
Definition: DtOverlayWedgeModel.h:324
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)