00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _SO_VOLUME_RENDERING_
00024 #define _SO_VOLUME_RENDERING_
00025
00026 #ifdef _WIN32
00027 # pragma warning( push )
00028 # pragma warning(disable:4251)
00029 # pragma warning(disable:4244)
00030 #endif
00031
00032
00033
00034 #ifdef _WIN32
00035 # include <SoVersion.h>
00036 # if defined(_DEBUG)
00037 # define __IVVRDLL "VolumeVizD.dll"
00038 # define __IVVRLIB "VolumeVizD.lib"
00039 # else
00040 # define __IVVRDLL "VolumeViz.dll"
00041 # define __IVVRLIB "VolumeViz.lib"
00042 # endif
00043 # ifndef VolumeViz_EXPORTS
00044 # ifndef OIV_DISABLE_AUTOLINK
00045 # pragma comment(lib,__IVVRLIB)
00046 # endif
00047 # endif
00048 #else // _WIN32
00049 # define __IVVRDLL "libVolumeViz"
00050 #endif // _WIN32
00051
00052 #include <Inventor/nodes/SoSubNode.h>
00053 #include <LDM/SoLDMGlobalResourceParameters.h>
00054 #include <LDM/nodes/SoHardwareQuery.h>
00055
00056 #include <Inventor/SoModule.h>
00057 SO_MODULE_HEADER(SoVolumeViz, __IVVRDLL)
00058
00059 class SoLDMTileManager;
00060
00094 class SoVolumeRendering {
00095
00096 public:
00116 static void init();
00117
00128 static void finish();
00129
00134 static bool isInitialized();
00135
00137
00138
00148 static void setWriteAlternateRep( SbBool flag );
00149
00153 static SbBool getWriteAlternateRep();
00154
00162 static void setReadAlternateRep( SbBool flag );
00163
00167 static SbBool getReadAlternateRep();
00168
00172 enum HW_Feature {
00183 HW_3DTEXMAP = SoHardwareQuery::HW_3DTEXMAP,
00189 HW_TEXCOLORMAP = SoHardwareQuery::HW_TEXCOLORMAP,
00194 HW_TEXCOMPRESSION = SoHardwareQuery::HW_TEXCOMPRESSION
00195 };
00196
00200 enum HW_SupportStatus {
00202 NO = SoHardwareQuery::NO,
00204 YES,
00206 UNKNOWN
00207 };
00208
00218 static HW_SupportStatus isSupported( HW_Feature feature );
00219
00220
00221 #if 1 SoDEPRECATED enum
00224 VisualFeedbackParam {
00228 DRAW_TILES = SoLDMGlobalResourceParameters::DRAW_TILES,
00232 DRAW_SLICES_TEX = SoLDMGlobalResourceParameters::DRAW_SLICES_TEX,
00241 DRAW_TOPOLOGY = SoLDMGlobalResourceParameters::DRAW_TOPOLOGY,
00248 DRAW_TILE_OUTLINE = SoLDMGlobalResourceParameters::DRAW_TILE_OUTLINE,
00258 SHOW_TILES_VALUATED = SoLDMGlobalResourceParameters::SHOW_TILES_VALUATED,
00263 SHOW_LOAD_UNLOAD_TILES = SoLDMGlobalResourceParameters::SHOW_LOAD_UNLOAD_TILES,
00270 USE_FAKE_DATA = SoLDMGlobalResourceParameters::USE_FAKE_DATA
00271 };
00272 SoDEPRECATED
00274 static void setVisualFeedbackParam( VisualFeedbackParam param, SbBool state );
00275 SoDEPRECATED
00277 static SbBool getVisualFeedbackParam( VisualFeedbackParam param );
00278 SoDEPRECATED
00280 static void setViewCulling( SbBool state );
00281 SoDEPRECATED
00283 static SbBool getViewCulling();
00284 SoDEPRECATED
00286 static void setScreenResolutionCulling( SbBool flag );
00287 SoDEPRECATED
00289 static SbBool getScreenResolutionCulling();
00290 SoDEPRECATED
00292 static void setIgnoreFullyTransparentTiles( SbBool state );
00293 SoDEPRECATED
00295 static SbBool getIgnoreFullyTransparentTiles();
00296 SoDEPRECATED
00298 static void setViewpointRefinement( SbBool state );
00299 SoDEPRECATED
00301 static SbBool getViewpointRefinement();
00302 SoDEPRECATED
00304 static void setSliceEqualResolution( SbBool state, SbBool forceRedraw = TRUE );
00305 SoDEPRECATED
00307 static SbBool getSliceEqualResolution();
00308 SoDEPRECATED
00310 static void setMoveLowResolution( SbBool state );
00311 SoDEPRECATED
00313 static SbBool getMoveLowResolution();
00314 SoDEPRECATED
00316 static void setLoadNotificationRate(int);
00317 SoDEPRECATED
00319 static int getLoadNotificationRate();
00320 SoDEPRECATED
00322 static void setLoadCB( SoLDMLoadCB *func, void *userData = NULL );
00323 SoDEPRECATED
00325 static void setMonitoringCB( SoLDMMonitoringCB *func, int memAmount, void *userData = NULL );
00326 SoDEPRECATED
00328 static void setMaxMainMemory( int maxMainMemory );
00329 SoDEPRECATED
00331 static int getMaxMainMemory();
00332 SoDEPRECATED
00334 static void setMaxTexMemory( int maxTexMemory );
00335 SoDEPRECATED
00337 static int getMaxTexMemory();
00338 SoDEPRECATED
00340 static void setTex3LoadRate( int loadRate );
00341 SoDEPRECATED
00343 static int getTex3LoadRate();
00344 SoDEPRECATED
00346 static void setNumIO(unsigned int numIO);
00347 SoDEPRECATED
00349 static unsigned int getNumIO();
00350
00351 #endif
00353 #if 1 SoDEPRECATED
00366 static void setDelayedRendering( SbBool flag );
00367 SoDEPRECATED
00372 static SbBool getDelayedRendering();
00373
00374 #endif
00376
00377 private:
00378
00379 enum Cmd{
00380 SET_WRITE_ALTERNATE_REP = 0,
00381 SET_READ_ALTERNATE_REP,
00382 SET_DELAYED_RENDERING,
00383 SET_IGNORE_FULLY_TRANSPARENT_TILES,
00384 SET_MOVE_LOW_RES
00385 };
00386
00387 SoVolumeRendering();
00388
00389 private:
00390
00391
00392 static SbBool s_writeAlternateRep;
00393 static SbBool s_readAlternateRep;
00394 static SbBool s_delayedRendering;
00395 static int s_debugFlag;
00396
00397 static int s_initRefCount;
00398
00399 static const char* s_versionString;
00400 };
00401
00402 #if defined(_WIN32)
00403 #pragma warning( pop )
00404 #endif
00405
00406 #endif // _SO_VOLUME_RENDERING_
00407
00408
00409