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 : Julien SALLANNE (Apr 2009) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_GEOELEVATIONGRID_ 00025 #define _SO_GEOELEVATIONGRID_ 00026 00027 #include <Inventor/fields/SoSFVec3f.h> 00028 #include <Inventor/fields/SoSFInt32.h> 00029 #include <Inventor/fields/SoMFFloat.h> 00030 #include <Inventor/fields/SoSFFloat.h> 00031 #include <Inventor/fields/SoMFString.h> 00032 #include <Inventor/nodes/SoGeoProjection.h> 00033 #include <Inventor/nodes/SoIndexedFaceSet.h> 00034 00099 class SoGeoElevationGrid : public SoIndexedFaceSet { 00100 00101 SO_NODE_HEADER(SoGeoElevationGrid); 00102 00103 public: 00104 // Fields 00110 SoSFFloat yScale; 00111 00116 SoSFVec3f geoGridOrigin; 00117 00133 SoMFString geoSystem; 00134 00140 SoMFFloat height; 00141 00145 SoSFInt32 xDimension; 00146 00153 SoSFFloat xSpacing; 00154 00158 SoSFInt32 zDimension; 00159 00167 SoSFFloat zSpacing; 00168 00172 SoGeoElevationGrid(); 00173 00174 private: 00175 // Implements actions 00176 virtual void GLRender(SoGLRenderAction *action); 00177 00178 // Computes bounding box 00179 virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er); 00180 00181 private: 00182 static void initClass(); 00183 static void exitClass(); 00184 00185 private: 00186 00187 virtual ~SoGeoElevationGrid(); 00188 00189 private: 00190 00191 void buildGrid( SoAction *action ); 00192 float computeHeight(int index); 00193 00194 00195 00196 }; 00197 00198 #endif /* _SO_GEOELEVATIONGRID_ */ 00199 00200 00201