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 
68  void initialize(const DtVector& normalColor, const DtVector& highLightColor,
69  DtOverlayRenderer* render, DtWidgetPicker& picker);
70 
72  void hide();
73 
75  void setChannelX(double x);
76 
78  double channelX() const;
79 
81  void setChannelY(double y);
82 
84  double channelY() const;
85 
87  void setGeocentric(DtVector geocentric);
88 
90  DtVector geocentric() const;
91 
93  DtVector& geocentric();
94 
96  void setGeodetic(DtVector geodetic);
97 
99  DtVector geodetic() const;
100 
102  DtVector& geodetic();
103 
105  void setMode(Mode mode);
106 
108  const Mode& mode() const;
109 
111  void setHighlight(bool isHighLight);
112 
114  bool highlight() const;
115 
117  void setNormalColor(DtVector color);
118 
120  DtVector normalColor() const;
121 
123  void setHighlightColor(DtVector color);
124 
126  DtVector highlightColor() const;
127 
129  void setVertexWidth(int width);
130 
132  int vertexWidth() const;
133 
135  void setHighlightRangeSquare(int range);
136 
138  int highlightRangeSquare() const;
139 
141  DtFilledPolygon* polygon() const;
142 
143  protected:
144 
145  double myChannelX;
146  double myChannelY;
147  DtVector myGeocentric;
148  DtVector myGeodetic;
151  DtVector myNormalColor;
156  };
157 
162  DtOsgGeoExtentRectangle(DtDe& de, DtChannel* channel, DtVector color);
163 
165  virtual ~DtOsgGeoExtentRectangle();
166 
168  virtual void reset();
169 
171  virtual void hide();
172 
177  virtual void setVertexChannelCoordinate(int index, double channelX, double channelY);
178 
182  virtual void setVertexLongitude(int index, double longitude);
183 
187  virtual void setVertexLatitude(int index, double latitude);
188 
191  virtual double getVertexLongitude(int index);
192 
195  virtual double getVertexLatitude(int index);
196 
200  virtual void place(double channelX, double channelY);
201 
203  virtual void drag();
204 
208  virtual void move(double channelX, double channelY);
209 
211  virtual void dirty();
212 
216  virtual void cleanup(bool deleteGeometry);
217 
221  virtual void update(double channelX, double channelY);
222 
224  virtual DtChannel* channel() const;
225 
226  public:
227  boost::signalslib::signal<void(int index, double longtitude, double latitude)> signal_vertexChanged;
228 
229  protected:
230 
234  virtual void draw(double channelX, double channelY);
235 
238  virtual void drawVertex(Vertex& vertex);
239 
244  virtual void handleHighlight(int index, double channelX, double channelY);
245 
249  virtual void geodeticToGeocentric(const DtVector& geodetic, DtVector& geocentric);
250 
254  virtual void geocentricToGeodetic(const DtVector& geocentric, DtVector& geodetic);
255 
260  virtual void geocentricToChannel(const DtVector& geocentric, double& mouseX, double& mouseY);
261 
267  virtual bool channelToGeocentric(double channelX, double channelY, DtVector& geocentric);
268 
269  protected:
270 
273  Vertex* myVertices[4];
276  osg::Matrixd myPreviousMVPMatrix;
277  bool myIsDirty;
278  DtVector myColor;
280 
281  DtIntersectorsContainer* myIntersectors = nullptr;
282  };
283 }
bool myIsHighlight
Definition: DtOsgGeoExtentRectangle.h:150
Vertex is placed.
Definition: DtOsgGeoExtentRectangle.h:49
The vertex of the rectangle.
Definition: DtOsgGeoExtentRectangle.h:39
bool myIsDirty
Definition: DtOsgGeoExtentRectangle.h:277
Mode
The current operation mode.
Definition: DtOsgGeoExtentRectangle.h:44
Definition: vrfObjectManipulationHandlerBaseClass.h:62
int myVertexWidth
Definition: DtOsgGeoExtentRectangle.h:154
#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:148
double myChannelX
Definition: DtOsgGeoExtentRectangle.h:145
double myChannelY
Definition: DtOsgGeoExtentRectangle.h:146
DtVector myGeocentric
Definition: DtOsgGeoExtentRectangle.h:147
osg::Matrixd myPreviousMVPMatrix
Definition: DtOsgGeoExtentRectangle.h:276
Vertex is not placed.
Definition: DtOsgGeoExtentRectangle.h:47
DtVector myColor
Definition: DtOsgGeoExtentRectangle.h:278
DtDe & myDe
Definition: DtOsgGeoExtentRectangle.h:271
bool myAxisAligned
Definition: DtOsgGeoExtentRectangle.h:279
DtFilledPolygon * myPolygon
Definition: DtOsgGeoExtentRectangle.h:153
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:272
int myHighlightRangeSquare
Definition: DtOsgGeoExtentRectangle.h:155
const char int mode
Definition: ioapi.h:38
Contains DLL export macros.
DtVector myNormalColor
Definition: DtOsgGeoExtentRectangle.h:151
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:152
boost::signalslib::signal< void(int index, double longtitude, double latitude)> signal_vertexChanged
Definition: DtOsgGeoExtentRectangle.h:227
DtChannel * myChannel
Definition: DtOsgGeoExtentRectangle.h:275
DtOsgGeoExtentRectangle::Vertex::Mode myMode
Definition: DtOsgGeoExtentRectangle.h:149
DtFilledPolygon * myRectangle
Definition: DtOsgGeoExtentRectangle.h:274
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 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)