Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoHeightFieldDetail.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24
25#ifndef _SOHEIGHTFIELDDETAIL_H
26#define _SOHEIGHTFIELDDETAIL_H
27
28#ifdef _WIN32
29#pragma warning(push)
30#pragma warning(disable:4251)
31#endif
32
33#include <VolumeViz/nodes/SoVolumeRendering.h>
34#include <Inventor/STL/vector>
35#include <Inventor/details/SoSubDetail.h>
36#include <Inventor/SbVec.h>
37
38#include <LDM/SoLDMTileID.h>
39
40class SoDataSet;
41class SoAction;
43
73{
74
75 SO_DETAIL_HEADER(SoHeightFieldDetail);
76
77public:
86
93 double getValue(size_t propertyNumber) const;
94
98 inline size_t getNumProperties() const { return m_properties.size(); }
99
108 void getProperty(size_t propertyNumber, SoHeightFieldProperty*& property, int& id) const;
109
113 const SbVec3i32& getIjkPos() const;
114
118 inline float getHeight() const { return m_height; }
119
123 inline const SbVec4i32& getColor() const { return m_color; }
124
126 virtual SoDetail* copy() const;
127
128private:
129 static void initClass();
130 static void exitClass();
131
132 inline void setProperties(const SoLDM::DataSetIdPairList& propData) { m_properties = propData; }
133
134 inline void setUvPos(const SbVec2f &pos) { m_uvPos = pos; }
135
136 inline const SbVec2f& getUvPos() const { return m_uvPos; }
137
138 inline void setIjkPos(const SbVec3i32 &pos) { m_ijkPos = pos; }
139
140 inline void setTile(const SoLDMTileID& tile) { m_tileId = tile; }
141
143 inline const SoLDMTileID& getTile() const { return m_tileId; }
144
146 inline void setHeight(float height) { m_height = height; }
147
149 inline void setColor(const SbVec4i32& color) { m_color = color; }
150
154 void fetchValues(const SbVec3i32& pos);
155
156private:
157 SoLDM::DataSetIdPairList m_properties;
158 std::vector<double> m_values;
159 SbVec3i32 m_ijkPos;
160
162 float m_height;
163
165 SbVec4i32 m_color;
166
167 SbVec2f m_uvPos;
168
169 SoLDMTileID m_tileId;
170};
171
172
173#ifdef _WIN32
174#pragma warning(pop)
175#endif
176
177#endif /* _SOHEIGHTFIELDDETAIL_H */
178
179
2D vector class.
Definition SbVec.h:76
3D vector class.
Definition SbVec.h:1517
4D vector class.
Definition SbVec.h:2639
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Definition SoDataSet.h:139
Base class for describing detail information about a shape node.
Definition SoDetail.h:99
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Stores detail informa...
float getHeight() const
Get the height value of the nearest elevation point.
void getProperty(size_t propertyNumber, SoHeightFieldProperty *&property, int &id) const
Returns the specified property and its id.
const SbVec4i32 & getColor() const
Returns the color of the picked cell.
double getValue(size_t propertyNumber) const
Returns the value of the picked cell in the specified property (SoHeightFieldProperty node).
const SbVec3i32 & getIjkPos() const
Returns the position in data space (cell coordinates) of the picked cell.
SoHeightFieldDetail()
Constructor.
virtual ~SoHeightFieldDetail()
Destructor.
size_t getNumProperties() const
Returns the number of active properties.
virtual SoDetail * copy() const
Returns an instance that is a copy of this instance.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Height field property...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63
std::vector< DataSetIdPair > DataSetIdPairList
List of DataSetIdPair.
Definition SoLDM.h:76