VR-Forces 5.0.3 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) 2010 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  void setPixelRatio(float pixelRatio);
67 
68  protected:
70  virtual void reloadTextFonts() = 0;
71 
73  static bool clip( double xMin, double xMax, double yMin, double yMax,
74  double x0src, double y0src, double x1src, double y1src,
75  double &x0clip, double &y0clip, double &x1clip, double &y1clip);
76 
77  private:
78 
80  DtGridLinesDrawer( const DtGridLinesDrawer& orig );
81 
83  DtGridLinesDrawer& operator = ( const DtGridLinesDrawer& rhs );
84 
85  protected:
86 
89  osg::Matrix myWorldToWindowMatrix;
90 
95 
98  float myPixelRatio;
99 
100  std::vector<double> myLatLonAllowableSpacings;
101  std::vector<double> myCartesianAllowableSpacings;
102 
103  };
104 
105 }
Contains the DtGridLinesParameters class declaration.
float myPixelRatio
Definition: DtGridLinesDrawer.h:98
DtOverlayRenderer * myOverlayRenderer
Definition: DtGridLinesDrawer.h:96
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtFontSP myFont
Definition: DtGridLinesDrawer.h:97
int myStartChannelX
Definition: DtGridLinesDrawer.h:91
int myStartChannelY
Definition: DtGridLinesDrawer.h:92
int myEndChannelY
Definition: DtGridLinesDrawer.h:94
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:52
Contains makVrv::DtFontManager class.
DtOsgChannel * myChannel
Definition: DtGridLinesDrawer.h:88
osg::Matrix myWorldToWindowMatrix
Definition: DtGridLinesDrawer.h:89
std::vector< double > myLatLonAllowableSpacings
Definition: DtGridLinesDrawer.h:100
std::vector< double > myCartesianAllowableSpacings
Definition: DtGridLinesDrawer.h:101
Contains the DtGridLinesSettingsRecord class declaration.
boost::shared_ptr< DtFont > DtFontSP
Definition: DtFontManager.h:20
int myEndChannelX
Definition: DtGridLinesDrawer.h:93
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:70
DtDe & myDe
Definition: DtGridLinesDrawer.h:87
The DtOverlayRenderer implements the overlay concept. An overlay is a 2D scene that is drawn on top o...
Definition: DtOverlayRenderer.h:41

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)