SoLDMNodeFrontManager Class Reference
[Kernel]

Large Data Management LDM Node Front Manager abstract base class. More...

#include <LDM/SoLDMNodeFrontManager.h>

Inheritance diagram for SoLDMNodeFrontManager:
SoLDMLargeDataManagement

List of all members.

Public Member Functions

 SoLDMNodeFrontManager ()
virtual ~SoLDMNodeFrontManager ()
LDM_TILE_ID_TYPE getNumTileIDs ()
int getNumFileIDs ()
virtual int getFileID (SoLDMTileID tileID)=0
virtual SbBox3i32 getTilePos (SoLDMTileID tileID)=0
virtual int getMinResolution ()=0
virtual SoLDMTileID getTileID (const SbVec3i32 &cellPos, int resolution=0)=0
virtual SoLDMTileID getTexTileID (SoLDMTileID tileID)=0
virtual SoLDMTileID getShape2dTexTileID (SoLdmShape *shape, const SoLDMTileID &tileID)
virtual SoLDMTileID getDataTileID (SoLDMTileID tileID)=0
virtual void getTexFront (std::vector< SoLDMTileID > &toLoad, std::vector< SoLDMTileID > &toUnload)=0
virtual void getNextTexFront (std::vector< SoLDMTileID > &toLoad, std::vector< SoLDMTileID > &toUnload, int maxRes=0)=0
virtual void getNextShape2dTexFront (SoLdmShape *hf, std::vector< SoLDMTileID > &toLoad, std::vector< SoLDMTileID > &toUnload)
virtual void reset2dTexFronts (SoLdmShape *shape)=0
virtual void getNextSkinTexFront (std::vector< SoLDMTileID > &toLoad, std::vector< SoLDMTileID > &toUnload, const std::vector< SbBox3i32 > &boxes)
virtual void getOrderedTexFront (const SbVec3i32 &viewPoint, std::vector< SoLDMTileID > &orderedTexFront)=0
virtual void getOrderedSkinTexFront (const SbVec3i32 &viewPoint, std::vector< SoLDMTileID > &orderedTexFront)
virtual void getOrderedShape2dTexFront (SoLdmShape *shape, const SbVec3i32 &viewPoint, std::vector< SoLDMTileID > &orderedTexFront)
virtual void getOrderedDataFront (const SbVec3i32 &viewPoint, std::vector< SoLDMTileID > &orderedDataFront)=0
virtual void getTiles (const SbBox3i32 &region, std::vector< SoLDMTileID > &tiles)=0
virtual bool getTiles (const SbBox3i32 &region, int resolution, std::vector< SoLDMTileID > &tiles)=0
virtual bool registerSlice (int &id, SoShape *)=0
virtual void unRegisterSlice (int sliceID)=0
virtual void setSlicePlane (int sliceID, const SbPlane &plane)=0
virtual void getNextSliceTexFront (int sliceID, std::vector< SoLDMTileID > &toLoad, std::vector< SoLDMTileID > &toUnload)=0
virtual void geomChangeNotify (SbBool redraw=FALSE)
virtual void resourceChangeNotify ()
void movingChangeNotify (SbBool movingValue)
virtual bool isTextureFrontEmpty ()
virtual bool isSliceTexFrontEmpty (int)
virtual void startTraversalNotify ()
virtual float getWeight (SoLDMTileID tileID)
virtual LDM_TILE_ID_TYPE getMaxTileIDAtResolution (int level)=0
virtual int getTileLevel (SoLDMTileID tileID)=0
virtual void shouldInit ()
virtual void setSliceMaxVisualResolution (int sliceID, int res)=0
virtual int getNextLoadedStepLevel (int id)

Detailed Description

Large Data Management LDM Node Front Manager abstract base class.

This class is only needed for advanced users who intend to extend or replace internal LDM algorithms.

NOTE: This class does not exist in Open Inventor 10.0 and later.

The SoLDMNodeFrontManager is in charge of maintaining a data structure representing the multiresolution organization of the data stored on disk and the state of this data in main memory for a specific frame (tiles loaded in main memory and their importance and attributes for rendering).

The set of tiles of higher weights in this data structure represent the best available textures to fit in texture memory for the frame to render. This collection is the result of the data structure evaluation.

An evaluation of the structure is performed when LDM asks (getNextTexFront, getNextSliceTexFront, getOrderedDataFront) for an update of the texture node front and if the SoLDMNodeFrontManager was previously notified that something changed (geomChangeNotify, resourceChangeNotify, movingChangeNotify) e.g., some geometry has changed, some new tiles have been loaded, etc.

The SoLDMNodeFrontManager asks the SoLDMTileVisitor to compute the weight of each node. Based on these weights, decisions are made to either refine (load tiles of higher resolution) or collapse the multiresolution system (unload). The SoLDMNodeFrontManager works under constraints given by the SoLDMResourceManager (number of texture allowed in texture memory and texture load rate).

If the user does not interact with the model, the quality of the rendering will increase until it reaches an optimal state. The asynchronous loading process continues loading until the weight of the next tile to load is less than the weight of the next tile to unload meaning that the optimal collection of tiles is present in main memory and in texture memory.

SEE ALSO

SoLDMResourceManager, SoLDMTileManager

See related examples:

VolRend


Constructor & Destructor Documentation

SoLDMNodeFrontManager::SoLDMNodeFrontManager (  ) 

Constructor.

virtual SoLDMNodeFrontManager::~SoLDMNodeFrontManager (  )  [virtual]

Destructor.


Member Function Documentation

virtual void SoLDMNodeFrontManager::geomChangeNotify ( SbBool  redraw = FALSE  )  [virtual]

Notifies SoLDMNodeFrontManager that it's necessary to re-evaluate the data structure due to geometry or property changes.

The redraw flag specifies whether to redraw the data set or not.

virtual SoLDMTileID SoLDMNodeFrontManager::getDataTileID ( SoLDMTileID  tileID  )  [pure virtual]

Given a tileID, returns the tileID whose data will be used for the input tileID.

In other words, the tileID returned is in the data front managed by the Tile Manager and may be the input tileID or its closest ancestor in the front.

virtual int SoLDMNodeFrontManager::getFileID ( SoLDMTileID  tileID  )  [pure virtual]

Returns the file ID corresponding to the specified tile ID (ID of the tile in the file).

Returns 0 if the tile is outside of the real data set (i.e., no data is present in the file for this tile).

virtual LDM_TILE_ID_TYPE SoLDMNodeFrontManager::getMaxTileIDAtResolution ( int  level  )  [pure virtual]

return the maximum tileID at a given depth.

Used to prioritize tiles until a given level of resolution

virtual int SoLDMNodeFrontManager::getMinResolution (  )  [pure virtual]

Returns how many different subsample levels of the data set the data stores.

The number returned is the power of 2 of the lowest resolution.

int SoLDMNodeFrontManager::getNextLoadedStepLevel ( int  id  )  [inline, virtual]

Return the level of the next time step.

virtual void SoLDMNodeFrontManager::getNextShape2dTexFront ( SoLdmShape hf,
std::vector< SoLDMTileID > &  toLoad,
std::vector< SoLDMTileID > &  toUnload 
) [virtual]

Same as getNextTexFront but for 2d shapes.

Parameters:
hf The 2d shape rendering node
toLoad Contains texture tiles to load
toUnload Contains texture tiles to unload
virtual void SoLDMNodeFrontManager::getNextSkinTexFront ( std::vector< SoLDMTileID > &  toLoad,
std::vector< SoLDMTileID > &  toUnload,
const std::vector< SbBox3i32 > &  boxes 
) [virtual]

Same as getNextTexFront but for skin geometry.

Only tiles intersecting boxes will be loaded.

Parameters:
toLoad contains texture tiles to load
toUnload contains texture tiles to unload
boxes are the boxes which intersect the loaded tiles
virtual void SoLDMNodeFrontManager::getNextSliceTexFront ( int  sliceID,
std::vector< SoLDMTileID > &  toLoad,
std::vector< SoLDMTileID > &  toUnload 
) [pure virtual]

Returns the next set of 2D tiles to load and unload for slice texturing of slice sliceID.

virtual void SoLDMNodeFrontManager::getNextTexFront ( std::vector< SoLDMTileID > &  toLoad,
std::vector< SoLDMTileID > &  toUnload,
int  maxRes = 0 
) [pure virtual]

Returns the list of tiles to unload from texture memory and the list of tiles to load into texture memory.

If necessary, this method will update the texture front according to the Resource Manager. It is called by the Texture Manager.

int SoLDMNodeFrontManager::getNumFileIDs (  ) 

Returns the total number of file IDs used ( < getNumTileIDs() ).


m_numFileIDs must be initialized the first time getNextTexFront is called.

If the data set has dimension x,y,z, then getNumTileIds represents the number of tiles in a cubic data set of dimension D, where

D = nearest greater power of 2 to max(x,y,z)

(This number varies depending on the topology used). A fileID represents the ID of a tile that is actually used and is 0 if the tile is outside of the actual non cubic data set of dimension x,y,z.

getNumFileIDs returns the number of non null fileIds and is used by the Tile Manager. (It represents the maximum number of non-empty tiles that can be present in main memory.)

LDM_TILE_ID_TYPE SoLDMNodeFrontManager::getNumTileIDs (  ) 

Returns the total number of tile IDs used.


m_numTileIDs must be initialized the first time getNextTexFront is called. If the data set has x,y,z for dimension, then getNumTileIDs represents the number of tiles in a cubic data set of dimension D, where

D = nearest power of 2 greater than max(x,y,z)

(This number varies depending on the topology used). Used by the Texture Manager to initialize the array of texture information containing texture ids,...

virtual void SoLDMNodeFrontManager::getOrderedDataFront ( const SbVec3i32 viewPoint,
std::vector< SoLDMTileID > &  orderedDataFront 
) [pure virtual]

Returns the data front tiles sorted according to distance from the viewpoint in data coordinates.

The number of tiles is returned also. The tiles are returned in order, back to front.

virtual void SoLDMNodeFrontManager::getOrderedShape2dTexFront ( SoLdmShape shape,
const SbVec3i32 viewPoint,
std::vector< SoLDMTileID > &  orderedTexFront 
) [virtual]

Same as getOrderedTexFront but for 2d shapes slice geometry.

Default implementation just calls getOrderedTexFront

virtual void SoLDMNodeFrontManager::getOrderedSkinTexFront ( const SbVec3i32 viewPoint,
std::vector< SoLDMTileID > &  orderedTexFront 
) [virtual]

Same as getOrderedTexFront but for skin geometry.

Default implementation just calls getOrderedTexFront

virtual void SoLDMNodeFrontManager::getOrderedTexFront ( const SbVec3i32 viewPoint,
std::vector< SoLDMTileID > &  orderedTexFront 
) [pure virtual]

Returns the texture front tiles sorted according to distance from the viewpoint in data coordinates.

The number of tiles is returned also. The tiles are returned in order, back to front.
This method does not update the texture front. It is called after getTexFront() method for rendering purposes only.

virtual SoLDMTileID SoLDMNodeFrontManager::getShape2dTexTileID ( SoLdmShape shape,
const SoLDMTileID tileID 
) [virtual]

Same thing as getTexTileID but for a 2d shape.

virtual void SoLDMNodeFrontManager::getTexFront ( std::vector< SoLDMTileID > &  toLoad,
std::vector< SoLDMTileID > &  toUnload 
) [pure virtual]

Returns the list of tiles unloaded from texture memory and the list of tiles loaded into texture memory by a previous getNextTexFront.

The texture front is not updated.

virtual SoLDMTileID SoLDMNodeFrontManager::getTexTileID ( SoLDMTileID  tileID  )  [pure virtual]

Given a tileID, returns the tileID whose texture will be used for the input tileID.

In other words, the tileID returned is in the texture front and may be the input tileID or its closest ancestor in the front.

virtual SoLDMTileID SoLDMNodeFrontManager::getTileID ( const SbVec3i32 cellPos,
int  resolution = 0 
) [pure virtual]

Given the position of a cell (i,j,k) and the resolution, returns the tile ID of the corresponding tile.

virtual int SoLDMNodeFrontManager::getTileLevel ( SoLDMTileID  tileID  )  [pure virtual]

return the depth of the given tileID.

virtual SbBox3i32 SoLDMNodeFrontManager::getTilePos ( SoLDMTileID  tileID  )  [pure virtual]

Returns the tile position in data coordinates of the specified tile ID.

virtual bool SoLDMNodeFrontManager::getTiles ( const SbBox3i32 region,
int  resolution,
std::vector< SoLDMTileID > &  tiles 
) [pure virtual]

Given a resolution, returns the list of tiles intersecting the specified region.

Returns FALSE if the specified resolution is incorrect, i.e., if the resolution specified is less than the lowest resolution of the data.

virtual void SoLDMNodeFrontManager::getTiles ( const SbBox3i32 region,
std::vector< SoLDMTileID > &  tiles 
) [pure virtual]

Returns the list of tiles intersecting the specified region.

float SoLDMNodeFrontManager::getWeight ( SoLDMTileID  tileID  )  [inline, virtual]

Utility function to get a tile's weight.

virtual bool SoLDMNodeFrontManager::isSliceTexFrontEmpty ( int   )  [inline, virtual]

Indicates if there is no texture to be loaded yet because nothing is in main memory.

virtual bool SoLDMNodeFrontManager::isTextureFrontEmpty (  )  [inline, virtual]

Indicates if there is no texture to be loaded yet because nothing is in main memory.

void SoLDMNodeFrontManager::movingChangeNotify ( SbBool  movingValue  ) 

Notifies SoLDMNodeFrontManager if the user is interacting with the scene or not.

virtual bool SoLDMNodeFrontManager::registerSlice ( int &  id,
SoShape  
) [pure virtual]

This function must be called by a slice to notify the nodeFrontManager that a new data structure must be maintained for it.

The returned value indicates whether the slice has already been registered (TRUE) or not.

virtual void SoLDMNodeFrontManager::reset2dTexFronts ( SoLdmShape shape  )  [pure virtual]
virtual void SoLDMNodeFrontManager::resourceChangeNotify (  )  [virtual]

Notifies SoLDMNodeFrontManager that texture resources have changed and the front needs to be recalculated.

virtual void SoLDMNodeFrontManager::setSliceMaxVisualResolution ( int  sliceID,
int  res 
) [pure virtual]

Set the maximum display resolution of slice sliceID.

virtual void SoLDMNodeFrontManager::setSlicePlane ( int  sliceID,
const SbPlane plane 
) [pure virtual]

Tells SoLDMNodeFrontManager what plane the slice is in.

virtual void SoLDMNodeFrontManager::shouldInit (  )  [inline, virtual]

Indicates that the manager should be initialized.

virtual void SoLDMNodeFrontManager::startTraversalNotify (  )  [inline, virtual]

This function is called at the beginning of each traversal and can be used to initialize whatever variables are necessary for the SoLDMNodeFrontManager.

virtual void SoLDMNodeFrontManager::unRegisterSlice ( int  sliceID  )  [pure virtual]

Notifies SoLDMNodeFrontManager that the slice of ID sliceID is no longer valid.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/