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) 2022 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 #include <vrvUtil/signalslib.h>
14 #include <matrix/vlVector.h>
15 
16 namespace makVrv
17 {
18  class DtOverlayRenderer;
19  class DtWidgetPicker;
20  class DtFilledPolygon;
21  class DtDe;
22  class DtChannel;
23  class DtDisplayUnitsConverter;
24  class DtCameraNode;
25  class DtIntersector;
26  class DtIntersectorsContainer;
27 
32  {
33  public:
34 
38  {
39  public:
40 
42  enum Mode
43  {
50  };
51 
53  Vertex();
54 
56  ~Vertex();
57 
59  void reset();
60 
64  void initialize(const DtVector& normalColor, const DtVector& highLightColor,
65  DtOverlayRenderer* render, DtWidgetPicker& picker);
66 
68  void hide();
69 
71  void draw();
72 
74  void setWindowX(double windowX);
75 
77  double windowX() const;
78 
80  void setWindowY(double windowY);
81 
83  double windowY() const;
84 
86  void setGeocentric(DtVector geocentric);
87 
89  DtVector geocentric() const;
90 
92  DtVector& geocentric();
93 
95  void setGeodetic(DtVector geodetic);
96 
98  DtVector geodetic() const;
99 
101  DtVector& geodetic();
102 
104  void setMode(Mode mode);
105 
107  Mode mode() const;
108 
110  void setHighlight(bool isHighLight);
111 
113  bool highlight() const;
114 
116  void setNormalColor(DtVector color);
117 
119  DtVector normalColor() const;
120 
122  void setHighlightColor(DtVector color);
123 
125  DtVector highlightColor() const;
126 
128  void setVertexWidth(int width);
129 
131  int vertexWidth() const;
132 
134  void setHighlightRangeSquare(int range);
135 
137  int highlightRangeSquare() const;
138 
139  protected:
140 
141  double myWindowX;
142  double myWindowY;
152  };
153 
158 
160  virtual ~DtOsgGeoExtentRectangle();
161 
165  virtual bool initialize(DtChannel* channel);
166 
168  virtual void reset();
169 
171  virtual void hide();
172 
177  virtual void setVertexWindowCoordinate(int index, double windowX, double windowY);
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 windowX, double windowY);
201 
203  virtual void drag();
204 
208  virtual void move(double windowX, double windowY);
209 
211  virtual void dirty();
212 
216  virtual void cleanup(bool deleteGeometry);
217 
221  virtual void update(double mouseX, double mouseY);
222 
223  public:
224  boost::signalslib::signal<void(int index, double longtitude, double latitude)> signal_vertexChanged;
225 
226  protected:
227 
231  virtual void draw(double mouseX, double mouseY);
232 
237  virtual void handleHighlight(int index, double mouseX, double mouseY);
238 
242  virtual void geodeticToGeocentric(const DtVector& geodetic, DtVector& geocentric);
243 
247  virtual void geocentricToGeodetic(const DtVector& geocentric, DtVector& geodetic);
248 
253  virtual void geocentricToWindow(const DtVector& geocentric, double& mouseX, double& mouseY);
254 
256  virtual void windowToGeocentric(double mouseX, double mouseY, DtVector& geocentric);
257  protected:
258 
261  Vertex* myVertices[4];
265  bool myIsDirty;
267 
268  DtIntersectorsContainer* myIntersectors = nullptr;
269  };
270 }
bool myIsHighlight
Definition: DtOsgGeoExtentRectangle.h:146
Vertex is placed.
Definition: DtOsgGeoExtentRectangle.h:47
double myWindowX
Definition: DtOsgGeoExtentRectangle.h:141
double myWindowY
Definition: DtOsgGeoExtentRectangle.h:142
The vertex of the rectangle.
Definition: DtOsgGeoExtentRectangle.h:37
DtCameraNode * myCameraNode
Definition: DtOsgGeoExtentRectangle.h:263
bool myIsDirty
Definition: DtOsgGeoExtentRectangle.h:265
Mode
The current operation mode.
Definition: DtOsgGeoExtentRectangle.h:42
Definition: vrfObjectManipulationHandlerBaseClass.h:62
int myVertexWidth
Definition: DtOsgGeoExtentRectangle.h:150
#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:31
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:144
DtVector myGeocentric
Definition: DtOsgGeoExtentRectangle.h:143
Vertex is not placed.
Definition: DtOsgGeoExtentRectangle.h:45
DtVector myColor
Definition: DtOsgGeoExtentRectangle.h:266
DtDe & myDe
Definition: DtOsgGeoExtentRectangle.h:259
DtFilledPolygon * myPolygon
Definition: DtOsgGeoExtentRectangle.h:149
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:61
const DtDisplayUnitsConverter & myConverter
Definition: DtOsgGeoExtentRectangle.h:260
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:30
int myHighlightRangeSquare
Definition: DtOsgGeoExtentRectangle.h:151
const char int mode
Definition: ioapi.h:38
Contains DLL export macros.
DtVector myNormalColor
Definition: DtOsgGeoExtentRectangle.h:147
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
Vertex is dragging.
Definition: DtOsgGeoExtentRectangle.h:49
DtVector myHighlightColor
Definition: DtOsgGeoExtentRectangle.h:148
boost::signalslib::signal< void(int index, double longtitude, double latitude)> signal_vertexChanged
Definition: DtOsgGeoExtentRectangle.h:224
DtChannel * myChannel
Definition: DtOsgGeoExtentRectangle.h:264
DtOsgGeoExtentRectangle::Vertex::Mode myMode
Definition: DtOsgGeoExtentRectangle.h:145
DtFilledPolygon * myRectangle
Definition: DtOsgGeoExtentRectangle.h:262
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:69

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)