MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLTerrainVSOutputArray Class Reference
Inheritance diagram for TSLTerrainVSOutputArray:

Detailed Description

An output data object, which stores data in a 2-dimensional array.

Public Member Functions

 TSLTerrainVSOutputArray (unsigned int width, unsigned int height, TSLMUExtent extent, const TSLTerrainVSOutput::dataItem &initialValue)
 
virtual bool setData (unsigned int x, unsigned int y, const TSLTerrainVSOutput::dataUnion &value)
 
virtual bool getData (unsigned int x, unsigned int y, TSLTerrainVSOutput::dataItem &value)
 
- Public Member Functions inherited from TSLTerrainVSOutput
void inc ()
 
void dec ()
 
TSLTerrainVSOutput::dataType type () const
 
virtual bool valid () const
 

Additional Inherited Members

- Public Types inherited from TSLTerrainVSOutput
enum  dataType {
  typeTSLTerrainVSVisibility , typeShort , typeInt , typeFloat ,
  typeDouble , typeBool
}
 
- Protected Member Functions inherited from TSLTerrainVSOutput
 TSLTerrainVSOutput ()
 
 TSLTerrainVSOutput (const TSLTerrainVSOutput &other)
 
 TSLTerrainVSOutput (unsigned int width, unsigned int height, TSLMUExtent extent, TSLTerrainVSOutput::dataType dataType=TSLTerrainVSOutput::typeTSLTerrainVSVisibility)
 
virtual ~TSLTerrainVSOutput ()
 
- Protected Attributes inherited from TSLTerrainVSOutput
unsigned int m_width
 
unsigned int m_height
 
TSLTerrainVSOutput::dataType m_type
 
TSLMUExtent m_extent
 
bool m_valid
 Validity flag.
 

Constructor & Destructor Documentation

◆ TSLTerrainVSOutputArray()

TSLTerrainVSOutputArray::TSLTerrainVSOutputArray ( unsigned int width,
unsigned int height,
TSLMUExtent extent,
const TSLTerrainVSOutput::dataItem & initialValue )

Initialise the basic output object parameters, and setup the data array.

The array will be initialised with the initialValue parameter, which also specifies the internal data type of the array.

If the internal memory allocation fails or a zero width/height is passed, an error is added to the errorstack, the width and height member variables are zeroed and the valid function will fail (return false).

Parameters
widthThe number of horizontal elements in the output data array.
heightThe number of vertical elements in the output data array.
extentThe extent of the output data, in map units.
initialValueThe initial value of the array.

Member Function Documentation

◆ getData()

virtual bool TSLTerrainVSOutputArray::getData ( unsigned int x,
unsigned int y,
TSLTerrainVSOutput::dataItem & value )
virtual

Query a value from the output data.

The location given to this method is specified as an offset, from the bottom-left of the data.

If the provided location is valid, the value will be populated, and this method will return true. If the input location is invalid, this method will return false.

Parameters
xThe x offset to query
yThe y offset to query
valueStorage for the returned value

Implements TSLTerrainVSOutput.

◆ setData()

virtual bool TSLTerrainVSOutputArray::setData ( unsigned int x,
unsigned int y,
const TSLTerrainVSOutput::dataUnion & value )
virtual

Set a value in the output data.

The location given to this method is specified as an offset, from the bottom-left of the data. The provided value must have the same type as was specified in the constructor.

Parameters
xThe x offset in the output data
yThe y offset in the output data
valueThe value to set

This method will return true if the data was set, or false if the location was invalid.

Implements TSLTerrainVSOutput.