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-2017 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SOHEIGHTFIELDDETAIL_H 00026 #define _SOHEIGHTFIELDDETAIL_H 00027 00028 #ifdef _WIN32 00029 #pragma warning(push) 00030 #pragma warning(disable:4251) 00031 #endif 00032 00033 #include <VolumeViz/nodes/SoVolumeRendering.h> 00034 #include <Inventor/STL/vector> 00035 #include <Inventor/details/SoSubDetail.h> 00036 #include <Inventor/SbVec.h> 00037 00038 #include <LDM/SoLDMTileID.h> 00039 00040 class SoDataSet; 00041 class SoAction; 00042 class SoHeightFieldProperty; 00043 00072 class SoHeightFieldDetail : public SoDetail 00073 { 00074 00075 SO_DETAIL_HEADER(SoHeightFieldDetail); 00076 00077 public: 00081 SoHeightFieldDetail(); 00085 virtual ~SoHeightFieldDetail(); 00086 00093 double getValue(size_t propertyNumber) const; 00094 00098 inline size_t getNumProperties() const { return m_properties.size(); } 00099 00108 void getProperty(size_t propertyNumber, SoHeightFieldProperty*& property, int& id) const; 00109 00113 const SbVec3i32& getIjkPos() const; 00114 00118 inline float getHeight() const { return m_height; } 00119 00123 inline const SbVec4i32& getColor() const { return m_color; } 00124 00126 virtual SoDetail* copy() const; 00127 00128 private: 00129 static void initClass(); 00130 static void exitClass(); 00131 00132 inline void setProperties(const SoLDM::DataSetIdPairList& propData) { m_properties = propData; } 00133 00134 inline void setUvPos(const SbVec2f &pos) { m_uvPos = pos; } 00135 00136 inline const SbVec2f& getUvPos() const { return m_uvPos; } 00137 00138 inline void setIjkPos(const SbVec3i32 &pos) { m_ijkPos = pos; } 00139 00140 inline void setTile(const SoLDMTileID& tile) { m_tileId = tile; } 00141 00143 inline const SoLDMTileID& getTile() const { return m_tileId; } 00144 00146 inline void setHeight(float height) { m_height = height; } 00147 00149 inline void setColor(const SbVec4i32& color) { m_color = color; } 00150 00154 void fetchValues(const SbVec3i32& pos); 00155 00156 private: 00157 SoLDM::DataSetIdPairList m_properties; 00158 std::vector<double> m_values; 00159 SbVec3i32 m_ijkPos; 00160 00162 float m_height; 00163 00165 SbVec4i32 m_color; 00166 00167 SbVec2f m_uvPos; 00168 00169 SoLDMTileID m_tileId; 00170 }; 00171 00172 00173 #ifdef _WIN32 00174 #pragma warning(pop) 00175 #endif 00176 00177 #endif /* _SOHEIGHTFIELDDETAIL_H */ 00178 00179 00180