![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /***************************************************************************** 00002 * Copyright (c) 2010 MAK Technologies, Inc. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 /***************************************************************************** 00006 * $RCSfile: DtGridLinesDrawer.h,v $ $Revision: 1.17 $ $State: Exp $ 00007 *****************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <vrvOsg/vrvOsg.h> 00016 00017 #include <makArchives/DtGridLinesSettingsRecord.h> 00018 #include <vrvCore/DtGridLinesParameters.h> 00019 #include <vrvGraphics/DtFont.h> 00020 #include <osg/Matrix> 00021 00022 namespace makVrv 00023 { 00024 00025 class DtDe; 00026 class DtOsgChannel; 00027 class DtOverlayRenderer; 00028 00032 class DT_DLL_VRVOSG DtGridLinesDrawer 00033 : public DtGridLinesParameters 00034 { 00035 public: 00036 00038 DtGridLinesDrawer( DtDe& de ); 00039 00041 virtual ~DtGridLinesDrawer(); 00042 00044 virtual void setChannel( DtOsgChannel* channel ); 00045 00047 virtual void setChannelDimensions( int startChannelX, int startChannelY, 00048 int endChannelX, int endChannelY ); 00049 00051 virtual void setupOverlay(); 00052 00054 virtual void setupFont(); 00055 00058 virtual double lookupClosestLatLonSpacing( double minimumSpacingRadians ); 00059 00062 virtual double lookupClosestCartesianSpacing( double minimumSpacing ); 00063 00064 protected: 00065 00067 static bool clip( double xMin, double xMax, double yMin, double yMax, 00068 double x0src, double y0src, double x1src, double y1src, 00069 double &x0clip, double &y0clip, double &x1clip, double &y1clip); 00070 00071 private: 00072 00074 DtGridLinesDrawer( const DtGridLinesDrawer& orig ); 00075 00077 DtGridLinesDrawer& operator = ( const DtGridLinesDrawer& rhs ); 00078 00079 protected: 00080 00081 DtDe& myDe; 00082 DtOsgChannel* myChannel; 00083 osg::Matrix myWorldToWindowMatrix; 00084 00085 int myStartChannelX; 00086 int myStartChannelY; 00087 int myEndChannelX; 00088 int myEndChannelY; 00089 00090 DtOverlayRenderer* myOverlayRenderer; 00091 boost::shared_ptr<DtFont> myFont; 00092 00093 std::vector<double> myLatLonAllowableSpacings; 00094 std::vector<double> myCartesianAllowableSpacings; 00095 00096 }; 00097 00098 }