00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SOVOLUMEMASK_H
00024 #define SOVOLUMEMASK_H
00025
00026 #include <VolumeViz/nodes/SoVolumeData.h>
00027 #include <Inventor/fields/SoSFBitMask.h>
00028 #include <Inventor/fields/SoSFVec4f.h>
00029 #include <Inventor/fields/SoMFVec4f.h>
00030
00031
00032 class SoVolumeMaskReader;
00033 class SoCpuBufferUniform;
00034 class SoCpuBufferBasicProperty;
00035
00036 SO_PIMPL_PUBLIC_DECLARATION(SoVolumeMask)
00037
00038
00161 class SoVolumeMask : public SoVolumeData
00162 {
00163 SO_NODE_HEADER(SoVolumeMask);
00164
00165 SO_PIMPL_PUBLIC_HEADER( SoVolumeMask );
00166
00167 public:
00171 SoVolumeMask();
00172
00185 virtual int editSubVolume( const SbBox3i32& subVolume, SoBufferObject* userData );
00186
00197 virtual int editSubVolume( const SbBox3i32& subVolume, const double& value );
00198
00210 virtual int editSurfaceShape( const SoNode* surfaceShape, const float& thickness, const double& newValue );
00211
00233 virtual int editSolidShape( const SoNode* solidShape, const double& value );
00234
00239 bool saveEditing(SbString filename, bool recomputeLowerResolution = TRUE, const std::vector<char*> = std::vector<char*>(), SaveEditingCB callback = NULL);
00240
00244 void setDefaultValue( const bool defValue );
00245
00249 bool getDefaultValue() const;
00250
00251 private:
00252 static void initClass();
00253 static void exitClass();
00254
00255 virtual SoLDMReader* getAppropriateLDMReader(const SbString& pathname);
00257 virtual SoBufferObject* getTransformedTile(const SoLDMTileID& tile, const SoLDM::DataSetIdPair& pair,
00258 SoState * state = NULL, const bool useExtendedData=false);
00259
00260 private:
00261 virtual void GLRender(SoGLRenderAction* action);
00262
00263 inline virtual void setIsReadChar(bool flag);
00264
00265
00266 virtual SoVolumeData* getVolumeData();
00267
00268
00269 virtual void setProperties( SbVec3i32 dimension, SbVec3i32 tileSize, int border );
00270
00271 private:
00272 ~SoVolumeMask();
00273 void readerChanged();
00274
00275 };
00276
00277 void
00278 SoVolumeMask::setIsReadChar(bool flag)
00279 {
00280 m_dataCharRead = flag;
00281 }
00282
00283 #endif
00284
00285
00286