Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoLDMGlobalResourceParameters.h
Go to the documentation of this file.
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-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef _SO_LDM_GLOBAL_RESOURCE_PARAM_
24#define _SO_LDM_GLOBAL_RESOURCE_PARAM_
25
26class SoLDMTileManager;
27
28#include <LDM/SoLDM.h>
30
31
38typedef void SoLDMLoadCB( SbBool startLoading, void *userData );
39
46typedef void SoLDMMonitoringCB(SoDataSet *dataSet, double elapsedTime, double memLoaded, void *userData);
47
158{
159
160public:
162 // Memory Control Parameters section
163
173 static void setMaxMainMemory( int maxMainMemory );
174
179 static int getMaxMainMemory();
180
191 static void setMaxTexMemory( int maxTexMemory );
192
197 static int getMaxTexMemory();
198
215 static void setTex3LoadRate( int loadRate );
216
222 static int getTex3LoadRate();
223
237 static void setTex2LoadRate( int loadRate );
238
244 static int getTex2LoadRate();
245
260 static void setNumIO(unsigned int numIO);
261
266 static unsigned int getNumIO();
267
269 // VisualFeedback Parameters section
270
323
328
333
334
336 // Viewing Parameters section
337
344 static void setViewCulling( SbBool state, SbBool forceRedraw = TRUE );
345
351
363
369
378
384
392 static void setViewpointRefinement( SbBool state );
393
399
419 static void setSliceEqualResolution( SbBool state, SbBool forceRedraw = TRUE );
420
426
434 static void setLoadNotificationRate(int);
435
441
451 static void setLoadCB( SoLDMLoadCB *func, void *userData = NULL );
452
461 static void setMonitoringCB( SoLDMMonitoringCB *func, int memAmount, void *userData = NULL );
462
466 static inline int64_t getDefaultMaxTexMem() { return s_defaultMaxTexMemMB; }
467
471 static inline int64_t getDefaultMaxMainMem() { return s_defaultMaxMainMemMB; }
472
483 static void setMax2DTexMemory(uint64_t maxMemory);
484
489 static uint64_t getMax2DTexMemory();
490
491#if 1 SoDEPRECATED
498 static void setMoveLowResolution( SbBool state );
499SoDEPRECATED
506
507#endif
509private:
510
511 // These identifiers are binary fixed,
512 // do not changed enum value as it will break ART scenario
513 enum Cmd{
514 SET_VISUAL_FEEDBACK_PARAM = 0,
515 SET_MAX_MAIN_MEMORY = 1,
516 SET_MAX_TEX_MEMORY = 2,
517 SET_MAX_2D_TEXTURES = 3,
518 SET_MAX_NUM_TRIANGLES = 4, // no more supported
519 SET_TEX3_LOAD_RATE = 5,
520 SET_TEX2_LOAD_RATE = 6,
521 SET_NUMIO = 7,
522 SET_WRITE_ALTERNATE_REP = 8,
523 SET_READ_ALTERNATE_REP = 9,
524 SET_DELAYED_RENDERING = 10,
525 SET_VIEW_CULLING = 11,
526 SET_SCREEN_RESOLUTION_CULLING = 12,
527 SET_VIEWPOINT_REFINEMENT = 13,
528 SET_IGNORE_FULLY_TRANSPARENT_TILES = 14,
529 SET_SLICE_EQUAL_RES = 15,
530 SET_MOVE_LOW_RES = 16,
531 SET_LOAD_NOTIFICATION_RATE = 17
532 };
533
534 static void initClass();
535
539 static bool isDrawingOutlines();
540
541#if 1 SoDEPRECATED
545 static size_t getMaxTextureSizeBytes();
546
547#endif
549private:
550
551// ------------------------------------------------------------
552 // VisualFeedback Parameters
553 static SbBool s_drawTiles;
554 static SbBool s_drawSlicesTex;
555 static SbBool s_drawTopology;
556 static SbBool s_drawTileOutline;
557 static SbBool s_showTilesLoaded;
558 static SbBool s_showLoadUnloadTiles;
559 static SbBool s_useFakeData;
560 // ------------------------------------------------------------
561 // Viewing Parameters
562 static SbBool s_ignoreFullyTransparentTiles;
563 static SbBool s_viewCulling;
564 static SbBool s_screenResolutionCulling;
565 static SbBool s_viewpointRefinement;
566 static SbBool s_sliceEqualResolution;
567 static SbBool s_moveLowResolution;
568
569 static int64_t s_defaultMaxTexMemMB;
570 static int64_t s_defaultMaxMainMemMB;
571
572};
573#endif // _SO_LDM_GLOBAL_RESOURCE_PARAM_
574
575
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
void SoLDMLoadCB(SbBool startLoading, void *userData)
Loading callback for LDM mode.
void SoLDMMonitoringCB(SoDataSet *dataSet, double elapsedTime, double memLoaded, void *userData)
Monitoring callback for LDM mode.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Definition SoDataSet.h:139
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Global r...
static void setLoadCB(SoLDMLoadCB *func, void *userData=NULL)
Sets a callback to be called with the tile loading state.
static void setTex2LoadRate(int loadRate)
Sets the maximum number of 2D textures allowed to be downloaded into texture (GPU) memory per frame (...
static int getMaxTexMemory()
Returns the maximum texture memory in MB for all the VolumeViz data sets.
static int getLoadNotificationRate()
Returns the load notification rate.
static void setSliceEqualResolution(SbBool state, SbBool forceRedraw=TRUE)
Sets the slice equal resolution flag.
static SoDEPRECATED SbBool getMoveLowResolution()
Returns the move low resolution flag.
static SoDEPRECATED void setMoveLowResolution(SbBool state)
Sets the low resolution when moving flag.
static void setVisualFeedbackParam(VisualFeedbackParam param, SbBool state)
Sets the specified visual feedback parameter to true or false.
static void setScreenResolutionCulling(SbBool flag)
Sets the screen resolution culling flag.
static int getTex2LoadRate()
Returns the maximum number of 2D textures allowed to be loaded into texture memory per frame for all ...
static void setIgnoreFullyTransparentTiles(SbBool state)
Sets the IgnoreFullyTransparentTiles flag.
static void setTex3LoadRate(int loadRate)
Sets the maximum number of 3D textures allowed to be downloaded into texture (GPU) memory,...
static SbBool getScreenResolutionCulling()
Returns the screen resolution culling state.
static int64_t getDefaultMaxMainMem()
Returns the default maximum system (CPU) memory in MB.
static void setLoadNotificationRate(int)
Sets the load notification rate (number of tiles).
static SbBool getViewpointRefinement()
Returns the viewpoint refinement flag.
static uint64_t getMax2DTexMemory()
Get the maximum number of 2D textures allowed to be loaded.
@ DRAW_TILE_OUTLINE
Draw tile outlines for all primitives.
@ DRAW_TILES
Draw the tiles of SoVolumeRender or SoVolumeSkin primitives.
@ DRAW_SLICES_TEX
Use texturing for SoOrthoSlice, SoObliqueSlice, and SoVolumeGeometry primitives.
@ SHOW_TILES_VALUATED
Show tiles visited by the Tile Visitor.
@ USE_FAKE_DATA
Use fake data instead of the real data during loading into main memory.
@ SHOW_LOAD_UNLOAD_TILES
Show tiles loaded (in red) and unloaded (in blue) in texture memory.
@ DRAW_TOPOLOGY
Show tiles loaded in main memory.
static SbBool getIgnoreFullyTransparentTiles()
Returns the IgnoreFullyTransparentTiles flag.
static SbBool getViewCulling()
Returns the view culling flag.
static SbBool getVisualFeedbackParam(VisualFeedbackParam param)
Returns the state of the specified visual feedback parameter.
static void setMaxMainMemory(int maxMainMemory)
Sets the maximum main (CPU) memory, in MB, to use for all VolumeViz data sets.
static int getTex3LoadRate()
Returns the maximum number of tiles (3D textures) allowed to be downloaded into texture (GPU) memory ...
static void setMaxTexMemory(int maxTexMemory)
Sets the maximum texture (GPU) memory, in MB, for all VolumeViz data sets.
static SbBool getSliceEqualResolution()
Returns the slice equal resolution flag.
static void setViewpointRefinement(SbBool state)
Sets the viewpoint refinement flag.
static void setNumIO(unsigned int numIO)
Sets how many simultaneous tile loading threads to use if multi I/O mode is on (it is on when LDM mod...
static void setViewCulling(SbBool state, SbBool forceRedraw=TRUE)
Sets the view culling flag.
static unsigned int getNumIO()
Returns the current number of loading threads.
static void setMax2DTexMemory(uint64_t maxMemory)
Sets the maximum 2D texture GPU memory in MB allowed to be loaded for all VolumeViz data sets.
static int64_t getDefaultMaxTexMem()
Returns the default maximum GPU memory in MB.
static void setMonitoringCB(SoLDMMonitoringCB *func, int memAmount, void *userData=NULL)
Sets a monitoring callback .
static int getMaxMainMemory()
Returns the maximum main memory in MB for all the VolumeViz data sets.
int SbBool
Boolean type.
Definition SbBase.h:87