VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGridLinesDrawer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
17 #include <vrvGraphics/DtFont.h>
19 
20 #include <osg/Matrix>
21 
22 namespace makVrv
23 {
24 
25  class DtDe;
26  class DtOsgChannel;
27  class DtOverlayRenderer;
28 
33  : public DtGridLinesParameters
34  {
35  public:
36 
38  DtGridLinesDrawer( DtDe& de );
39 
41  DtGridLinesDrawer(const DtGridLinesDrawer& orig) = delete;
42 
44  DtGridLinesDrawer& operator = (const DtGridLinesDrawer& rhs) = delete;
45 
47  virtual ~DtGridLinesDrawer();
48 
50  virtual void setChannel( DtOsgChannel* channel );
51 
53  virtual void setChannelDimensions( int startChannelX, int startChannelY,
54  int endChannelX, int endChannelY );
55 
57  virtual void setupOverlay();
58 
60  virtual void setupFont();
61 
64  virtual double lookupClosestLatLonSpacing( double minimumSpacingRadians );
65 
68  virtual double lookupClosestCartesianSpacing( double minimumSpacing );
69 
72  virtual double lookupClosestGarsSpacing(double minimumSpacing) const;
73 
76  void setPixelRatio(float pixelRatio);
77 
78  protected:
80  virtual void reloadTextFonts() = 0;
81 
83  static bool clip( double xMin, double xMax, double yMin, double yMax,
84  double x0src, double y0src, double x1src, double y1src,
85  double &x0clip, double &y0clip, double &x1clip, double &y1clip);
86 
87  // The method returns turns true if the limit would be exceeded. If warnings are enabled
88  // and no other warning has been given since the last time limits weren't exceeded, prints a console warning
89  // and notes that the requested lines exceeded the limit. This limit is adjustable in the model definition
90  // for grid lines.
91  virtual bool limitLines( int current, int limit);
92 
93  protected:
94 
97  osg::Matrix myWorldToWindowMatrix;
98 
103 
107 
108  std::vector<double> myLatLonAllowableSpacings;
109  std::vector<double> myCartesianAllowableSpacings;
110  std::vector<double> myGarsAllowableSpacings;
111 
113  };
114 
115 }
Contains the DtGridLinesParameters class declaration.
float myPixelRatio
Definition: DtGridLinesDrawer.h:106
DtOverlayRenderer * myOverlayRenderer
Definition: DtGridLinesDrawer.h:104
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
int myStartChannelX
Definition: DtGridLinesDrawer.h:99
int myStartChannelY
Definition: DtGridLinesDrawer.h:100
bool myLineLimitNeedsWarning
Definition: DtGridLinesDrawer.h:112
int myEndChannelY
Definition: DtGridLinesDrawer.h:102
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:58
std::vector< double > myGarsAllowableSpacings
Definition: DtGridLinesDrawer.h:110
DtOsgChannel * myChannel
Definition: DtGridLinesDrawer.h:96
osg::Matrix myWorldToWindowMatrix
Definition: DtGridLinesDrawer.h:97
std::vector< double > myLatLonAllowableSpacings
Definition: DtGridLinesDrawer.h:108
A class with encapsulated a font loaded from disk with a given size.
Definition: DtFontInterface.h:22
Contains makVrv::DtGLFontManager class.
std::vector< double > myCartesianAllowableSpacings
Definition: DtGridLinesDrawer.h:109
Contains the DtGridLinesSettingsRecord class declaration.
int myEndChannelX
Definition: DtGridLinesDrawer.h:101
Contains makVrv::DtFont class.
Base class with common data / methods for drawing grid lines on projected and geocentric databases \i...
Definition: DtGridLinesDrawer.h:32
Contains DLL export macros.
Interface for DtGridLinesParameters, a container class for holding all the dialog and model definitio...
Definition: DtGridLinesParameters.h:22
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
DtDe & myDe
Definition: DtGridLinesDrawer.h:95
DtFontInterface * myFont
Definition: DtGridLinesDrawer.h:105
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)