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) 2023 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  virtual ~DtGridLinesDrawer();
42 
44  virtual void setChannel( DtOsgChannel* channel );
45 
47  virtual void setChannelDimensions( int startChannelX, int startChannelY,
48  int endChannelX, int endChannelY );
49 
51  virtual void setupOverlay();
52 
54  virtual void setupFont();
55 
58  virtual double lookupClosestLatLonSpacing( double minimumSpacingRadians );
59 
62  virtual double lookupClosestCartesianSpacing( double minimumSpacing );
63 
66  virtual double lookupClosestGarsSpacing(double minimumSpacing) const;
67 
70  void setPixelRatio(float pixelRatio);
71 
72  protected:
74  virtual void reloadTextFonts() = 0;
75 
77  static bool clip( double xMin, double xMax, double yMin, double yMax,
78  double x0src, double y0src, double x1src, double y1src,
79  double &x0clip, double &y0clip, double &x1clip, double &y1clip);
80 
81  private:
82 
84  DtGridLinesDrawer( const DtGridLinesDrawer& orig );
85 
87  DtGridLinesDrawer& operator = ( const DtGridLinesDrawer& rhs );
88 
89  protected:
90 
93  osg::Matrix myWorldToWindowMatrix;
94 
99 
103 
104  std::vector<double> myLatLonAllowableSpacings;
105  std::vector<double> myCartesianAllowableSpacings;
106  std::vector<double> myGarsAllowableSpacings;
107 
108  };
109 
110 }
Contains the DtGridLinesParameters class declaration.
float myPixelRatio
Definition: DtGridLinesDrawer.h:102
DtOverlayRenderer * myOverlayRenderer
Definition: DtGridLinesDrawer.h:100
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
int myStartChannelX
Definition: DtGridLinesDrawer.h:95
int myStartChannelY
Definition: DtGridLinesDrawer.h:96
int myEndChannelY
Definition: DtGridLinesDrawer.h:98
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:55
std::vector< double > myGarsAllowableSpacings
Definition: DtGridLinesDrawer.h:106
DtOsgChannel * myChannel
Definition: DtGridLinesDrawer.h:92
osg::Matrix myWorldToWindowMatrix
Definition: DtGridLinesDrawer.h:93
std::vector< double > myLatLonAllowableSpacings
Definition: DtGridLinesDrawer.h:104
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:105
Contains the DtGridLinesSettingsRecord class declaration.
int myEndChannelX
Definition: DtGridLinesDrawer.h:97
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:72
DtDe & myDe
Definition: DtGridLinesDrawer.h:91
DtFontInterface * myFont
Definition: DtGridLinesDrawer.h:101
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)