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
00178 class SoVolumeMask : public SoVolumeData
00179 {
00180 SO_NODE_HEADER(SoVolumeMask);
00181
00182 SO_PIMPL_PUBLIC_HEADER( SoVolumeMask );
00183
00184 public:
00188 SoVolumeMask();
00189
00202 virtual int editSubVolume( const SbBox3i32& subVolume, SoBufferObject* userData );
00203
00214 virtual int editSubVolume( const SbBox3i32& subVolume, const double& value );
00215
00227 virtual int editSurfaceShape( const SoNode* surfaceShape, const float& thickness, const double& newValue );
00228
00250 virtual int editSolidShape( const SoNode* solidShape, const double& value );
00251
00256 bool saveEditing(SbString filename, bool recomputeLowerResolution = TRUE, const std::vector<char*> = std::vector<char*>(), SaveEditingCB callback = NULL);
00257
00261 void setDefaultValue( const bool defValue );
00262
00266 bool getDefaultValue() const;
00267
00268 private:
00269 static void initClass();
00270 static void exitClass();
00271
00272 virtual SoLDMReader* getAppropriateLDMReader(const SbString& pathname);
00274 virtual SoBufferObject* getTransformedTile(const SoLDMTileID& tile, const SoLDM::DataSetIdPair& pair,
00275 SoState * state = NULL, const bool useExtendedData=false);
00276
00277 private:
00278 virtual void GLRender(SoGLRenderAction* action);
00279
00280 inline virtual void setIsReadChar(bool flag);
00281
00282
00283 virtual SoVolumeData* getVolumeData();
00284
00285
00286 virtual void setProperties( SbVec3i32 dimension, SbVec3i32 tileSize, int border );
00287
00288 private:
00289 ~SoVolumeMask();
00290 void readerChanged();
00291
00292 };
00293
00294 void
00295 SoVolumeMask::setIsReadChar(bool flag)
00296 {
00297 m_dataCharRead = flag;
00298 }
00299
00300 #endif
00301
00302
00303