00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Frederic FRATANI (MMM yyyy) 00022 ** Modified by : Christophe OGNIER (MMM yyyy) 00023 **=======================================================================*/ 00024 00025 00026 00046 #ifndef SOTVIZCOMPASS_H 00047 #define SOTVIZCOMPASS_H 00048 00049 00050 #include <TerrainViz/viewer/SoTVizNavigationToolBase.h> 00051 00052 #ifdef _WIN32 00053 #pragma warning(push) 00054 #pragma warning(disable:4512) 00055 #endif 00056 00057 /* 00058 * SoTVizCompass inherits from the SoTVizNavigationToolBase class. 00059 * It displays the viewer orientation. 00060 */ 00061 class SoDEPRECATED SoTVizCompass : public SoTVizNavigationToolBase 00063 { 00064 public: 00065 00069 SoTVizCompass (SoTVizViewer& viewer); 00070 00071 00075 virtual ~SoTVizCompass (); 00076 00077 00085 virtual void loadFile (const char* fileName); 00086 00087 00088 enum predefinedTerrainCompass { 00092 TERRAINCOMPASS_DEFAULT, 00096 TERRAINCOMPASS_REVERSED, 00100 TERRAINCOMPASS_TRANSPARENT 00101 }; 00102 00103 00107 virtual void loadPredefined (predefinedTerrainCompass); 00108 00109 00115 virtual void notifyOrientation (float newOrientation); 00116 00117 private: 00118 00119 // this derivated method is called in loadFile function 00120 // here, it inserts a rotation node centered on compass mobile part 00121 void preTransformTool(); 00122 00123 // the "specific" interaction method of the compass 00124 // not implemented : a click on the compass sets the viewer orientation 00125 void processSpecificInteraction (SbVec2s mouseLocation, SoPickedPoint* pickPoint); 00126 00127 // more internal scenegraph nodes 00128 SoSeparator * m_fixedPart; 00129 SoTransform * m_rotation; 00130 SoSeparator * m_mobilePart; 00131 00132 // terrain viewer reference, usefull in processSpecificInteraction 00133 SoTVizViewer& m_viewer; 00134 }; 00135 00136 #ifdef _WIN32 00137 #pragma warning(pop) 00138 #endif 00139 00140 00141 #endif //SOTVIZCOMPASS_H 00142 00143 00144