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;
704 typedef struct GeomPriority
718 void copyParameters(SoLDMMediator *mediator);
723 void fprintfResourceManager(FILE *f);
728 void invalidateData();
736 void setNumTiles(
int numTiles);
753 bool isReportDisabled();
754 void setReportDisabled(
bool flag);
756 int getNumTilesLoaded();
758 void setToReport(
bool flag);
759 void increaseNumTilesLoaded();
760 void decreaseNumTilesLoaded();
761 void resetNumTilesLoaded();
762 void resetFixedResVar();
766 void enableParamsNotify(
SbBool state);
768 virtual void notify(SoNotList*);
777 inline void forceFixedResolution(
bool flag);
783 inline bool isFixedResolutionForced()
const;
890 bool m_forceFixedResolution;
899 void updateTileHalfLife(
float timeInSec);
900 void updateTileSize();
901 void updateMaxResolutionThreshold(
int threshold );
902 void updateMinResolutionThreshold(
int threshold );
905 void updateDisableFixedResolutionMode();
911 int m_numTilesLoaded;
912 int m_numTilesNeeded;
914 bool m_reportDisable;
916 bool m_bLdmParamDebug;
919 int m_previousMinThreshold;
924 SoLDMTileVisitor* m_fixedResVisitor;
925 SoLDMTileVisitor* m_beforeFixedResVisitor;
926 bool m_beforeFixedResVisitorFlag;
928 float m_movingTimeOut;
930 std::vector<GeomPriority> m_geomPriority;
931 int getGeometryIndex(
SoType geometryType);
933 static bool s_artForceFixed;
938SoLDMResourceParameters::isReportDisabled()
940 return m_reportDisable;
945SoLDMResourceParameters::setReportDisabled(
bool flag)
947 m_reportDisable = flag;
952SoLDMResourceParameters::getFixedResCB()
959SoLDMResourceParameters::getNumTilesLoaded()
961 return m_numTilesLoaded;
966SoLDMResourceParameters::toReport()
973SoLDMResourceParameters::setToReport(
bool flag)
980SoLDMResourceParameters::increaseNumTilesLoaded()
987SoLDMResourceParameters::decreaseNumTilesLoaded()
994SoLDMResourceParameters::resetNumTilesLoaded()
996 m_numTilesLoaded = 0;
1003 m_resourceMgr = resourceManager;
1016SoLDMResourceParameters::forceFixedResolution(
bool flag)
1018 m_forceFixedResolution = flag;
1023SoLDMResourceParameters::isFixedResolutionForced()
const
1025 return m_forceFixedResolution || s_artForceFixed;
1032#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.
@ 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 how LDM store the tiles in 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.