VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgGeoExtentRectangle.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2025 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <vrvUtil/signalslib.h>
15 
16 #include <matrix/vlVector.h>
17 #include <osg/Matrixd>
18 
19 namespace makVrv
20 {
21  class DtOverlayRenderer;
22  class DtWidgetPicker;
23  class DtFilledPolygon;
24  class DtDe;
25  class DtChannel;
26  class DtDisplayUnitsConverter;
27  class DtIntersector;
28  class DtIntersectorsContainer;
29 
34  {
35  public:
36 
40  {
41  public:
42 
44  enum Mode
45  {
52  };
53 
55  Vertex();
56 
58  ~Vertex();
59 
61  void reset();
62 
66  void initialize(const DtVector& normalColor, const DtVector& highLightColor,
67  DtOverlayRenderer* render, DtWidgetPicker& picker);
68 
70  void hide();
71 
73  void setChannelX(double x);
74 
76  double channelX() const;
77 
79  void setChannelY(double y);
80 
82  double channelY() const;
83 
85  void setGeocentric(DtVector geocentric);
86 
88  DtVector geocentric() const;
89 
91  DtVector& geocentric();
92 
94  void setGeodetic(DtVector geodetic);
95 
97  DtVector geodetic() const;
98 
100  DtVector& geodetic();
101 
103  void setMode(Mode mode);
104 
106  const Mode& mode() const;
107 
109  void setHighlight(bool isHighLight);
110 
112  bool highlight() const;
113 
115  void setNormalColor(DtVector color);
116 
118  DtVector normalColor() const;
119 
121  void setHighlightColor(DtVector color);
122 
124  DtVector highlightColor() const;
125 
127  void setVertexWidth(int width);
128 
130  int vertexWidth() const;
131 
133  void setHighlightRangeSquare(int range);
134 
136  int highlightRangeSquare() const;
137 
139  DtFilledPolygon* polygon() const;
140 
141  protected:
142 
143  double myChannelX;
144  double myChannelY;
145  DtVector myGeocentric;
146  DtVector myGeodetic;
149  DtVector myNormalColor;
154  };
155 
160  DtOsgGeoExtentRectangle(DtDe& de, DtChannel* channel, DtVector color);
161 
163  virtual ~DtOsgGeoExtentRectangle();
164 
166  virtual void reset();
167 
169  virtual void hide();
170 
175  virtual void setVertexChannelCoordinate(int index, double channelX, double channelY);
176 
180  virtual void setVertexLongitude(int index, double longitude);
181 
185  virtual void setVertexLatitude(int index, double latitude);
186 
189  virtual double getVertexLongitude(int index);
190 
193  virtual double getVertexLatitude(int index);
194 
198  virtual void place(double channelX, double channelY);
199 
201  virtual void drag();
202 
206  virtual void move(double channelX, double channelY);
207 
209  virtual void dirty();
210 
214  virtual void cleanup(bool deleteGeometry);
215 
219  virtual void update(double channelX, double channelY);
220 
222  virtual DtChannel* channel() const;
223 
224  public:
225  boost::signalslib::signal<void(int index, double longtitude, double latitude)> signal_vertexChanged;
226 
227  protected:
228 
232  virtual void draw(double channelX, double channelY);
233 
236  virtual void drawVertex(Vertex& vertex);
237 
242  virtual void handleHighlight(int index, double channelX, double channelY);
243 
247  virtual void geodeticToGeocentric(const DtVector& geodetic, DtVector& geocentric);
248 
252  virtual void geocentricToGeodetic(const DtVector& geocentric, DtVector& geodetic);
253 
258  virtual void geocentricToChannel(const DtVector& geocentric, double& mouseX, double& mouseY);
259 
265  virtual bool channelToGeocentric(double channelX, double channelY, DtVector& geocentric);
266 
267  protected:
268 
271  Vertex* myVertices[4];
274  osg::Matrixd myPreviousMVPMatrix;
275  bool myIsDirty;
276  DtVector myColor;
278 
279  DtIntersectorsContainer* myIntersectors = nullptr;
280  };
281 }
bool myIsHighlight
Definition: DtOsgGeoExtentRectangle.h:148
Vertex is placed.
Definition: DtOsgGeoExtentRectangle.h:49
The vertex of the rectangle.
Definition: DtOsgGeoExtentRectangle.h:39
bool myIsDirty
Definition: DtOsgGeoExtentRectangle.h:275
Mode
The current operation mode.
Definition: DtOsgGeoExtentRectangle.h:44
Definition: vrfObjectManipulationHandlerBaseClass.h:62
int myVertexWidth
Definition: DtOsgGeoExtentRectangle.h:152
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A rectangle defines an axis-aligned geospatial extent. A bounding box that is aligned with a spatial ...
Definition: DtOsgGeoExtentRectangle.h:33
Utility class that contains intersectors for all model sets in the system (3d, xr, 2d) Use an object of this class when all models sets can be possibly needed. When you know which model set you need, you can just use the DtIntersectorCreator to create an intersector for a model set Models sets corresponding to 3d, xr and 2d are created by default (these correspond to values of 0, 1 and 5) Additional model sets can be registered with DtIntersectorsContainer::registerModelSet.
Definition: DtIntersectorsContainer.h:37
DtVector myGeodetic
Definition: DtOsgGeoExtentRectangle.h:146
double myChannelX
Definition: DtOsgGeoExtentRectangle.h:143
double myChannelY
Definition: DtOsgGeoExtentRectangle.h:144
DtVector myGeocentric
Definition: DtOsgGeoExtentRectangle.h:145
osg::Matrixd myPreviousMVPMatrix
Definition: DtOsgGeoExtentRectangle.h:274
Vertex is not placed.
Definition: DtOsgGeoExtentRectangle.h:47
DtVector myColor
Definition: DtOsgGeoExtentRectangle.h:276
DtDe & myDe
Definition: DtOsgGeoExtentRectangle.h:269
bool myAxisAligned
Definition: DtOsgGeoExtentRectangle.h:277
DtFilledPolygon * myPolygon
Definition: DtOsgGeoExtentRectangle.h:151
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygon.h:27
The abstract Channel Class.
Definition: DtChannel.h:35
Utility class for doing global unit conversion. All conversions functions use the following naming co...
Definition: DtDisplayUnitsSettingsManager.h:62
const DtDisplayUnitsConverter & myConverter
Definition: DtOsgGeoExtentRectangle.h:270
int myHighlightRangeSquare
Definition: DtOsgGeoExtentRectangle.h:153
const char int mode
Definition: ioapi.h:38
Contains DLL export macros.
DtVector myNormalColor
Definition: DtOsgGeoExtentRectangle.h:149
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
Vertex is dragging.
Definition: DtOsgGeoExtentRectangle.h:51
DtVector myHighlightColor
Definition: DtOsgGeoExtentRectangle.h:150
boost::signalslib::signal< void(int index, double longtitude, double latitude)> signal_vertexChanged
Definition: DtOsgGeoExtentRectangle.h:225
DtChannel * myChannel
Definition: DtOsgGeoExtentRectangle.h:273
DtOsgGeoExtentRectangle::Vertex::Mode myMode
Definition: DtOsgGeoExtentRectangle.h:147
DtFilledPolygon * myRectangle
Definition: DtOsgGeoExtentRectangle.h:272
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53
The DtOverlayRenderer implements the overlay concept. An overlay is a 2D scene that is drawn on top o...
Definition: DtOverlayRenderer.h:67

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)