![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2012 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00009 00010 #pragma once 00011 00012 #include <vrvOsg/vrvOsg.h> 00013 #include <vrvOsg/DtOverlaySegmentedLineModelInstance.h> 00014 00015 00016 namespace makVrv 00017 { 00018 class DtSegmentedLine; 00019 class DtGreatCircleCurveGenerator; 00020 00024 class DT_DLL_VRVOSG DtOverlayGreatCircleArcModelInstance 00025 : public DtOverlaySegmentedLineModelInstance 00026 { 00027 public: 00028 00030 DtOverlayGreatCircleArcModelInstance(DtDe& de); 00031 00033 virtual ~DtOverlayGreatCircleArcModelInstance(); 00034 00037 virtual void setMaxSubdivisions( int subDivisions ); 00038 00042 virtual void setPreferredSubdivisionSize( double size ); 00043 00046 virtual void setHeightScale( double heightScale ); 00047 00050 virtual bool realize(DtModelDefinition& definition); 00051 00052 protected: 00053 00055 virtual void updateGeometry(); 00056 00058 virtual void generateStyleSegmentedGeometry(); 00059 00061 virtual void generateMultipointGeometry(); 00062 00064 virtual void updateSegments(); 00065 00067 virtual void resizeSegmentAttributes( int size ); 00068 00071 virtual int calculateNumSubdivisions( 00072 const DtGreatCircleCurveGenerator& curveGen, 00073 const DtVector& endGeod, double percentage ) const; 00074 00076 DtVector localToGeodetic( const DtVector& local ); 00077 00079 DtVector geodeticToLocal( const DtVector& geodetic ); 00080 00081 protected: 00082 00083 struct SegmentLandmarks 00084 { 00085 int segmentStartVertex; 00086 int segmentEndVertex; 00087 }; 00088 00089 typedef std::vector<SegmentLandmarks> SegmentLandmarksVector; 00090 00091 SegmentLandmarksVector mySegmentLandmarks; 00092 double myHeightScale; 00093 int myMaxSubdivisions; 00094 double myPreferredSubdivisionSize; 00095 }; 00096 }