SbTVizData Class Reference
[TerrainViz]

TerrainViz Abstract base class for elevation data. More...

#include <TerrainViz/SbTVizData.h>

Inheritance diagram for SbTVizData:
SbTVizRegularGridData

List of all members.

Public Types

enum  OpenMode {
  TVIZ_UNKNOWN = 0,
  TVIZ_ASCII,
  TVIZ_BINARY
}
enum  DataType {
  TVIZ_UCHAR = 0,
  TVIZ_USHORT,
  TVIZ_UINT32,
  TVIZ_FLOAT,
  TVIZ_CHAR,
  TVIZ_SHORT,
  TVIZ_INT32
}
enum  Encoding {
  TVIZ_BIG_ENDIAN = 0,
  TVIZ_LITTLE_ENDIAN
}
enum  Condition {
  TVIZ_LOWER = 0,
  TVIZ_LOWER_OR_EQUAL,
  TVIZ_EQUAL,
  TVIZ_GREATER,
  TVIZ_GREATER_OR_EQUAL
}

Public Member Functions

virtual ~SbTVizData ()
virtual float getValue (const SbVec2d &point) const =0
virtual float getAvgValue () const =0
virtual float getMaxValue () const =0
virtual float getMinValue () const =0
const SbStringgetFileName () const
const SbVec3dgetSize () const
const SbVec3dgetOffset () const
void setHoleValue (float value, Condition cond)
float getHoleValue (Condition &cond) const
void setHoleEdgePrecision (float holeRez)
float getHoleEdgePrecision () const
DataType getDataType () const
OpenMode getOpenMode () const
Encoding getEncoding () const
virtual SbBool writeDataFile (const SbString &filename, OpenMode mode)=0

Detailed Description

TerrainViz Abstract base class for elevation data.

This is the top class for the TerrainViz elevation data handling classes.

Elevations can be saved as a .DAT file, in ASCII or binary mode. If binary, the encoding must be specified: BIG_ENDIAN or LITTLE_ENDIAN.

Elevations can be shifted by an offset. All values are expressed in modeling coordinates, not physical units.

This class is to be used with an SoTVizRender node.

SEE ALSO

SbTVizRegularGridData, SbTVizTexture, SbTVizTextureList, SoTViz, SoTVizRender

Deprecated:

Deprecated since Open Inventor 9500
No longer supported.

Member Enumeration Documentation

Enumerator:
TVIZ_LOWER 

Value must be lower.

TVIZ_LOWER_OR_EQUAL 

Value must be lower or equal.

TVIZ_EQUAL 

Value must be equal.

TVIZ_GREATER 

Value must be greater.

TVIZ_GREATER_OR_EQUAL 

Value must be greater or equal.

Enumerator:
TVIZ_UCHAR 

Unsigned char values (default).

TVIZ_USHORT 

Unsigned short values.

TVIZ_UINT32 

Unsigned int values.

TVIZ_FLOAT 

Float values.

TVIZ_CHAR 

Char values.

TVIZ_SHORT 

Short values.

TVIZ_INT32 

Int values.

Enumerator:
TVIZ_BIG_ENDIAN 

File was written on a big endian machine.

TVIZ_LITTLE_ENDIAN 

File was written on a little endian machine.

Enumerator:
TVIZ_UNKNOWN 

Unknown (default).

TVIZ_ASCII 

File is ASCII.

TVIZ_BINARY 

File is binary.


Constructor & Destructor Documentation

virtual SbTVizData::~SbTVizData (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual float SbTVizData::getAvgValue (  )  const [pure virtual]

Returns the average altitude of the data.

Implemented in SbTVizRegularGridData.

DataType SbTVizData::getDataType (  )  const

Returns the type of the data (UCHAR, USHORT, FLOAT,.

..).

Encoding SbTVizData::getEncoding (  )  const

Returns the file encoding (BIG_ENDIAN, LITTLE_ENDIAN).

Used only with XML files.

const SbString& SbTVizData::getFileName (  )  const

Returns the file name.

float SbTVizData::getHoleEdgePrecision (  )  const

Gets the precision factor used for hole contouring.

Factor ranges from 0. (very poor quality) to 1. for best quality. Default value is 1.

float SbTVizData::getHoleValue ( Condition cond  )  const

Gets the value and condition to manage holes.

virtual float SbTVizData::getMaxValue (  )  const [pure virtual]

Returns the maximum altitude of the data.

Implemented in SbTVizRegularGridData.

virtual float SbTVizData::getMinValue (  )  const [pure virtual]

Returns the minimum altitude of the data.

Implemented in SbTVizRegularGridData.

const SbVec3d& SbTVizData::getOffset (  )  const

Returns the offset in 3D coordinates.

The offset is set in the XML terrain file or using SbTVizRegularGridData::loadDataFile.

OpenMode SbTVizData::getOpenMode (  )  const

Returns the file open mode (UNKNOWN, ASCII, BINARY).

Used only with XML files.

const SbVec3d& SbTVizData::getSize (  )  const

Returns the size in 3D coordinates.

virtual float SbTVizData::getValue ( const SbVec2d point  )  const [pure virtual]

Returns the altitude of the given 2D point (ground).

Implemented in SbTVizRegularGridData.

void SbTVizData::setHoleEdgePrecision ( float  holeRez  ) 

Sets the precision factor used for hole contouring.

Factor ranges from 0. (very poor quality) to 1. for best quality. Default value is 1.

void SbTVizData::setHoleValue ( float  value,
Condition  cond 
)

Sets the value and condition to manage holes.

virtual SbBool SbTVizData::writeDataFile ( const SbString filename,
OpenMode  mode 
) [pure virtual]

Writes altitude data to a .dat file (ASCII or BINARY).

Implemented in SbTVizRegularGridData.


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

Open Inventor Toolkit reference manual, generated on 22 Sep 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/