VR-Forces 4.10 Class Documentation
 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) 2020 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 
30  {
31  public:
32 
36  {
37  public:
38 
40  enum Mode
41  {
48  };
49 
51  Vertex();
52 
54  ~Vertex();
55 
57  void reset();
58 
62  void initialize(const DtVector& normalColor, const DtVector& highLightColor,
63  DtOverlayRenderer* render, DtWidgetPicker& picker);
64 
66  void hide();
67 
69  void draw();
70 
72  void setWindowX(double windowX);
73 
75  double windowX() const;
76 
78  void setWindowY(double windowY);
79 
81  double windowY() const;
82 
84  void setGeocentric(DtVector geocentric);
85 
87  DtVector geocentric() const;
88 
90  DtVector& geocentric();
91 
93  void setGeodetic(DtVector geodetic);
94 
96  DtVector geodetic() const;
97 
99  DtVector& geodetic();
100 
102  void setMode(Mode mode);
103 
105  Mode mode() const;
106 
108  void setHighlight(bool isHighLight);
109 
111  bool highlight() const;
112 
114  void setNormalColor(DtVector color);
115 
117  DtVector normalColor() const;
118 
120  void setHighlightColor(DtVector color);
121 
123  DtVector highlightColor() const;
124 
126  void setVertexWidth(int width);
127 
129  int vertexWidth() const;
130 
132  void setHighlightRangeSquare(int range);
133 
135  int highlightRangeSquare() const;
136 
137  protected:
138 
139  double myWindowX;
140  double myWindowY;
150  };
151 
156 
158  virtual ~DtOsgGeoExtentRectangle();
159 
163  virtual bool initialize(DtChannel* channel);
164 
166  virtual void reset();
167 
169  virtual void hide();
170 
175  virtual void setVertexWindowCoordinate(int index, double windowX, double windowY);
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 windowX, double windowY);
199 
201  virtual void drag();
202 
206  virtual void move(double windowX, double windowY);
207 
209  virtual void dirty();
210 
214  virtual void cleanup(bool deleteGeometry);
215 
219  virtual void update(double mouseX, double mouseY);
220 
221  public:
222  boost::signalslib::signal<void(int index, double longtitude, double latitude)> signal_vertexChanged;
223 
224  protected:
225 
229  virtual void draw(double mouseX, double mouseY);
230 
235  virtual void handleHighlight(int index, double mouseX, double mouseY);
236 
240  virtual void geodeticToGeocentric(const DtVector& geodetic, DtVector& geocentric);
241 
245  virtual void geocentricToGeodetic(const DtVector& geocentric, DtVector& geodetic);
246 
251  virtual void geocentricToWindow(const DtVector& geocentric, double& mouseX, double& mouseY);
252 
254  virtual void windowToGeocentric(double mouseX, double mouseY, DtVector& geocentric);
255 
256  protected:
257 
260  Vertex* myVertices[4];
264  bool myIsDirty;
266  };
267 }
bool myIsHighlight
Definition: DtOsgGeoExtentRectangle.h:144
Vertex is placed.
Definition: DtOsgGeoExtentRectangle.h:45
double myWindowX
Definition: DtOsgGeoExtentRectangle.h:139
double myWindowY
Definition: DtOsgGeoExtentRectangle.h:140
The vertex of the rectangle.
Definition: DtOsgGeoExtentRectangle.h:35
DtCameraNode * myCameraNode
Definition: DtOsgGeoExtentRectangle.h:262
bool myIsDirty
Definition: DtOsgGeoExtentRectangle.h:264
Mode
The current operation mode.
Definition: DtOsgGeoExtentRectangle.h:40
Definition: vrfObjectManipulationHandlerBaseClass.h:61
int myVertexWidth
Definition: DtOsgGeoExtentRectangle.h:148
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A rectangle defines an axis-aligned geospatial extent.
Definition: DtOsgGeoExtentRectangle.h:29
DtVector myGeodetic
Definition: DtOsgGeoExtentRectangle.h:142
DtVector myGeocentric
Definition: DtOsgGeoExtentRectangle.h:141
Vertex is not placed.
Definition: DtOsgGeoExtentRectangle.h:43
DtVector myColor
Definition: DtOsgGeoExtentRectangle.h:265
DtDe & myDe
Definition: DtOsgGeoExtentRectangle.h:258
DtFilledPolygon * myPolygon
Definition: DtOsgGeoExtentRectangle.h:147
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygon.h:26
DtDisplayUnitsConverter & myConverter
Definition: DtOsgGeoExtentRectangle.h:259
The abstract Channel Class.
Definition: DtChannel.h:30
Utility class for doing global unit conversion.
Definition: DtDisplayUnitsSettingsManager.h:59
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:29
int myHighlightRangeSquare
Definition: DtOsgGeoExtentRectangle.h:149
const char int mode
Definition: ioapi.h:38
Contains DLL export macros.
DtVector myNormalColor
Definition: DtOsgGeoExtentRectangle.h:145
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Vertex is dragging.
Definition: DtOsgGeoExtentRectangle.h:47
DtVector myHighlightColor
Definition: DtOsgGeoExtentRectangle.h:146
boost::signalslib::signal< void(int index, double longtitude, double latitude)> signal_vertexChanged
Definition: DtOsgGeoExtentRectangle.h:222
DtChannel * myChannel
Definition: DtOsgGeoExtentRectangle.h:263
DtOsgGeoExtentRectangle::Vertex::Mode myMode
Definition: DtOsgGeoExtentRectangle.h:143
DtFilledPolygon * myRectangle
Definition: DtOsgGeoExtentRectangle.h:261
The picker class which allocates and does picking operatings on widgets.
Definition: DtWidgetPicker.h:32
The DtOverlayRenderer implements the overlay concept.
Definition: DtOverlayRenderer.h:23

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)