25#ifndef LDM_RESOURCE_PARAMETER_H
26#define LDM_RESOURCE_PARAMETER_H
29#pragma warning( push )
30#pragma warning(disable:4251)
47#include <Inventor/STL/vector>
48#include <Inventor/STL/cassert>
52class SoLDMTileVisitor;
709 typedef struct GeomPriority
723 void copyParameters(SoLDMMediator *mediator);
728 void fprintfResourceManager(FILE *f);
733 void invalidateData();
741 void setNumTiles(
int numTiles);
758 bool isReportDisabled();
759 void setReportDisabled(
bool flag);
761 int getNumTilesLoaded();
763 void setToReport(
bool flag);
764 void increaseNumTilesLoaded();
765 void decreaseNumTilesLoaded();
766 void resetNumTilesLoaded();
767 void resetFixedResVar();
771 void enableParamsNotify(
SbBool state);
773 virtual void notify(SoNotList*);
782 inline void forceFixedResolution(
bool flag);
788 inline bool isFixedResolutionForced()
const;
895 bool m_forceFixedResolution;
904 void updateTileHalfLife(
float timeInSec);
905 void updateTileSize();
906 void updateMaxResolutionThreshold(
int threshold );
907 void updateMinResolutionThreshold(
int threshold );
910 void updateDisableFixedResolutionMode();
916 int m_numTilesLoaded;
917 int m_numTilesNeeded;
919 bool m_reportDisable;
921 bool m_bLdmParamDebug;
924 int m_previousMinThreshold;
929 SoLDMTileVisitor* m_fixedResVisitor;
930 SoLDMTileVisitor* m_beforeFixedResVisitor;
931 bool m_beforeFixedResVisitorFlag;
933 float m_movingTimeOut;
935 std::vector<GeomPriority> m_geomPriority;
936 int getGeometryIndex(
SoType geometryType);
938 static bool s_artForceFixed;
943SoLDMResourceParameters::isReportDisabled()
945 return m_reportDisable;
950SoLDMResourceParameters::setReportDisabled(
bool flag)
952 m_reportDisable = flag;
957SoLDMResourceParameters::getFixedResCB()
964SoLDMResourceParameters::getNumTilesLoaded()
966 return m_numTilesLoaded;
971SoLDMResourceParameters::toReport()
978SoLDMResourceParameters::setToReport(
bool flag)
985SoLDMResourceParameters::increaseNumTilesLoaded()
992SoLDMResourceParameters::decreaseNumTilesLoaded()
999SoLDMResourceParameters::resetNumTilesLoaded()
1001 m_numTilesLoaded = 0;
1008 m_resourceMgr = resourceManager;
1021SoLDMResourceParameters::forceFixedResolution(
bool flag)
1023 m_forceFixedResolution = flag;
1028SoLDMResourceParameters::isFixedResolutionForced()
const
1030 return m_forceFixedResolution || s_artForceFixed;
1037#pragma warning( pop )
std::ostream & operator<<(std::ostream &os, const SoLDMResourceParameters &p)
valueRef operator=(valueRef newValue)
Sets this field to newValue.
#define SO_FIELDCONTAINER_HEADER(className)
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Abstract base class for objects that contain fields.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Resource...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Defines ...
SoSFInt32 numPrefetchThread
Number of threads used by the tile prefetch mechanism.
ViewpointRefinementPolicy
Viewpoint refinement policies.
@ VIEWPOINT_REFINEMENT_ON
The refinement of tiles will depend on the viewpoint.
@ VIEWPOINT_REFINEMENT_INHERITED_FROM_GLOBAL
The refinement of tiles will depend on the viewpoint or not according to the flag returned by SoLDMGl...
@ VIEWPOINT_REFINEMENT_OFF
Viewpoint will not affect tile loading priorities.
SoSFBool tileBorders
Defines whether or not to generate borders around tiles.
SoSFInt32 minTilesToLoad
Minimum number of tiles that must be loaded in memory before rendering.
void enableFixedResolutionMode(int resolution, FixedResolutionCB *func)
This method is used to specify a callback that gives feedback while the rendering tries to reach an...
SoSFInt32 resolution
Specifies the resolution level when fixedResolution is TRUE.
int getDataSize()
Gets the size of a voxel in bytes.
SbBool getGeometryPriority(SoType geometryType, float &priority)
Returns the priority of the specified geometry type.
SoSFInt32 minResolutionThreshold
Minimum loading threshold for LDM module.
SoSFVec3i32 subTileDimension
Size of subtiles used by some accelerated algorithms.
SoSFEnum viewpointRefinementPolicy
Defines the viewpoint refinement policy.
TileCachePolicy
Tile cache management policy (see the Memory Management section above for more information).
@ NONE
For non-tiled data like DICOM or SEGY or an in-memory volume, tiles are created when needed (to send ...
@ LOWRES_ONLY
For non-tiled data like DICOM or SEGY or in-memory volume, tiles are created when needed (to send dat...
@ ALL
For non-tiled data like DICOM or SEGY or in-memory volume, tiles are created when needed (to send dat...
SoSFInt32 loadNotificationRate
Tile loading notification rate.
ScreenResolutionCullingPolicy
Screen resolution culling policies.
@ SCREEN_RESOLUTION_CULLING_INHERITED_FROM_GLOBAL
Screen resolution culling will be enabled or not according to the flag returned by SoLDMGlobalResourc...
@ SCREEN_RESOLUTION_CULLING_ON
Screen resolution culling is enabled.
@ SCREEN_RESOLUTION_CULLING_OFF
Screen resolution culling is disabled.
SoSFInt32 maxTexMemory
Maximum allowed texture (GPU) memory in MB for this data set.
SoSFInt32 max2DTexMemory
Maximum of 2D textures memory in MB for this data set.
SoSFInt32 maxMainMemory
Maximum allowed main memory in MB that LDM is allowed to use for this data set.
SoLDMResourceParameters()
Constructor.
SoSFFloat tileHalfLife
Tile half-life (seconds).
SoSFInt32 tex3LoadRate
Maximum number of 3D tiles to be loaded into texture memory per frame for this data set.
SoSFVec3i32 tileDimension
Sets the tile size.
SoSFBool fixedResolution
Specifies if a single resolution or several resolutions are used when the rendering is stabilized.
SoSFEnum tileCachePolicy
Specify which tiles should be cached in LDM memory.
float getMovingTimeOut()
Returns the amount of time during which LDM continues not loading data once a user stops interaction.
LoadPolicy
Tile Load Policy.
@ NO_USER_INTERACTION
Load tiles only when when there is no user interaction, i.e., application idles.
@ ALWAYS
Always load tiles.
void FixedResolutionCB(FixedResolutionReport &, void *)
When fixedResolution is TRUE and resolution is not -1, this callback is used by the application to ...
SoSFInt32 maxResolutionThreshold
Maximum loading threshold for the LDM module.
SoSFInt32 tex2LoadRate
Maximum number of 2D tiles to be loaded in texture memory per frame.
void setMovingTimeOut(float timeout)
Sets the amount of time (in seconds) during which LDM continues not loading once a user stops interac...
void setGeometryPriority(SoType geometryType, float priority)
Sets the importance of one type of geometry relative to others.
virtual ~SoLDMResourceParameters()
Destructor.
SoSFEnum loadPolicy
Tile loading policy.
SoSFEnum screenResolutionCullingPolicy
Defines the screen resolution culling policy.
Field containing a single Boolean value.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a int32_t integer.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Stores runtime type information.
This structure returns information to the application when fixedResolution is TRUE and resolution is ...
int numTilesLoaded
Number of tiles LDM has already loaded.
int numTilesToLoad
How many tiles need to be loaded.
ReportCode what
Report code.
int numTilesToAdd
How many more tiles need to be allowed in main memory.
ReportCode
Available report code.
@ ABORT
If LDM cannot grant a fixed resolution request, the callback function is called with an ABORT repor...
@ PROGRESS
Loading in progress.