SbTVizTextureList Class Reference
[TerrainViz]

TerrainViz Handles the quadtree of textures. More...

#include <TerrainViz/SbTVizTextureList.h>

Inheritance diagram for SbTVizTextureList:
SbPList

List of all members.

Public Member Functions

 SbTVizTextureList ()
 SbTVizTextureList (const SbTVizTextureList &texList)
virtual ~SbTVizTextureList ()
void addTexture (SbTVizTexture *tex)
void addTexture (const char *fileName, int level, const SbVec2s &position, const SbVec2s &borders=SbVec2s(0, 0))
const SbTVizTextureremoveTexture (const char *fileName)
const SbTVizTextureremoveTexture (int level, const SbVec2s &position)
const SbTVizTexturegetTexture (const char *fileName) const
const SbTVizTexturegetTexture (int level, const SbVec2s &position) const
void deleteAllTextures ()

Detailed Description

TerrainViz Handles the quadtree of textures.

The class handles a list of textures sorted to fit a quadtree. These textures are mapped on the mesh. The textures displayed are chosen according to the point of view. The textures are SbTVizTexture objects. The list of textures is to be used with an SoTVizRender node.

Textures are organized in a quadtree. The level of the texture is the depth level in the texture quadtree. Level n has 2^(2n) textures. By default the texture tree depth is null.

DTM_texturelevels.jpg

The position is specified as a pair of indices ( i , j ), where i is the row and and j is the column of the texture in a particular texture level. i and j range from 0 to 2^(n-1). See figure above.

It is not necessary to provide all textures. Some patches can be empty.

SEE ALSO

SbTVizData, SbTVizRegularGridData, SbTVizTexture, SoTViz, SoTVizRender

Deprecated:

Deprecated since Open Inventor 9500
No longer supported.

Constructor & Destructor Documentation

SbTVizTextureList::SbTVizTextureList (  ) 

Constructor.

SbTVizTextureList::SbTVizTextureList ( const SbTVizTextureList texList  ) 

Constructor by copy.

virtual SbTVizTextureList::~SbTVizTextureList (  )  [virtual]

Destructor.

Be aware that the destructor does not delete the SbTVizTexture objects referenced. See deleteAllTextures() to perform this operation


Member Function Documentation

void SbTVizTextureList::addTexture ( const char *  fileName,
int  level,
const SbVec2s position,
const SbVec2s borders = SbVec2s(0, 0) 
)

Adds a texture to the list.

Textures are organized in a quadtree. The level of the texture is the depth level in the texture quadtree. Level n has 2^(2n) textures. The position is specified as a pair of indices ( i , j ), where i is the row and and j is the column of the texture in a particular texture level. i and j range from 0 to 2^n-1. See figure above. Borders are the number of pixels used for texture continuity (overlapping) along X and Y.

void SbTVizTextureList::addTexture ( SbTVizTexture tex  ) 

Adds a texture to the list.

void SbTVizTextureList::deleteAllTextures (  ) 

Deletes all the SbTVizTexture objects referenced in the list.

Empties the list.

const SbTVizTexture* SbTVizTextureList::getTexture ( int  level,
const SbVec2s position 
) const

Returns the texture identified by level and position.

const SbTVizTexture* SbTVizTextureList::getTexture ( const char *  fileName  )  const

Returns the texture identified by filename.

const SbTVizTexture* SbTVizTextureList::removeTexture ( int  level,
const SbVec2s position 
)

Removes a texture (identified by level and position) from the list.

Returns the SbTVizTexture instance, or NULL if not found. Does not delete the SbTVizTexture object.

const SbTVizTexture* SbTVizTextureList::removeTexture ( const char *  fileName  ) 

Removes a texture (identified by filename) from the list.

Returns the SbTVizTexture instance, or NULL if not found. Does not delete the SbTVizTexture object.


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/