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

Detailed Description

The interface to an output data object, for use by the provided compositor classes.

If an application has defined its own compositor, it may use these classes, or define a custom output object. The dataType used by these classes is specified by the compositor. Using the provided output objects is unlikely to be more efficient than using an application-specific implementation.

For most viewshed operations, the output object should be initialised with the same parameters as the input object.

This object is reference counted. If the application is finished with it, the dec() method should be called.

Classes

struct  dataItem
 
union  dataUnion
 

Public Types

enum  dataType {
  typeTSLTerrainVSVisibility , typeShort , typeInt , typeFloat ,
  typeDouble , typeBool
}
 

Public Member Functions

virtual bool setData (unsigned int x, unsigned int y, const TSLTerrainVSOutput::dataUnion &value)=0
 
virtual bool getData (unsigned int x, unsigned int y, TSLTerrainVSOutput::dataItem &value)=0
 
void inc ()
 
void dec ()
 
TSLTerrainVSOutput::dataType type () const
 
virtual bool valid () const
 

Protected Member Functions

 TSLTerrainVSOutput ()
 
 TSLTerrainVSOutput (const TSLTerrainVSOutput &other)
 
 TSLTerrainVSOutput (unsigned int width, unsigned int height, TSLMUExtent extent, TSLTerrainVSOutput::dataType dataType=TSLTerrainVSOutput::typeTSLTerrainVSVisibility)
 
virtual ~TSLTerrainVSOutput ()
 

Protected Attributes

unsigned int m_width
 
unsigned int m_height
 
TSLTerrainVSOutput::dataType m_type
 
TSLMUExtent m_extent
 
bool m_valid
 Validity flag.
 

Class Documentation

◆ TSLTerrainVSOutput::dataUnion

union TSLTerrainVSOutput::dataUnion

A union, which is used by the TSLTerrainVSOutput classes to store data.

Class Members
bool b
double d
float f
int i
short s
TSLTerrainVSVisibility v

Member Enumeration Documentation

◆ dataType

An enum, which defines the possible data storage types for the TSLTerrain VSOutput class.

Enumerator
typeTSLTerrainVSVisibility 
typeShort 
typeInt 
typeFloat 
typeDouble 
typeBool 

Constructor & Destructor Documentation

◆ TSLTerrainVSOutput() [1/3]

TSLTerrainVSOutput::TSLTerrainVSOutput ( )
protected

◆ TSLTerrainVSOutput() [2/3]

TSLTerrainVSOutput::TSLTerrainVSOutput ( const TSLTerrainVSOutput & other)
protected

◆ TSLTerrainVSOutput() [3/3]

TSLTerrainVSOutput::TSLTerrainVSOutput ( unsigned int width,
unsigned int height,
TSLMUExtent extent,
TSLTerrainVSOutput::dataType dataType = TSLTerrainVSOutput::typeTSLTerrainVSVisibility )
protected

Constructor.

For most viewshed operations, the width, height, and extent parameters should be the same as the input object.

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.
dataTypeThe data type used for storing data.

◆ ~TSLTerrainVSOutput()

virtual TSLTerrainVSOutput::~TSLTerrainVSOutput ( )
protectedvirtual

Member Function Documentation

◆ dec()

void TSLTerrainVSOutput::dec ( )

Decrement this object's reference count.

◆ getData()

virtual bool TSLTerrainVSOutput::getData ( unsigned int x,
unsigned int y,
TSLTerrainVSOutput::dataItem & value )
pure 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 height value should be populated, and this method should return true. If the input location is invalid, this method should return false.

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

Implemented in TSLTerrainVSOutputArray.

◆ inc()

void TSLTerrainVSOutput::inc ( )

Increment this object's reference count.

◆ setData()

virtual bool TSLTerrainVSOutput::setData ( unsigned int x,
unsigned int y,
const TSLTerrainVSOutput::dataUnion & value )
pure 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 should return true if the data was set, or false if the location was invalid.

Implemented in TSLTerrainVSOutputArray.

◆ type()

TSLTerrainVSOutput::dataType TSLTerrainVSOutput::type ( ) const

Query the type of data stored by this output object.

◆ valid()

virtual bool TSLTerrainVSOutput::valid ( ) const
virtual

Check the validity of this Output object

Member Data Documentation

◆ m_extent

TSLMUExtent TSLTerrainVSOutput::m_extent
protected

The map unit extent of the output data object.

◆ m_height

unsigned int TSLTerrainVSOutput::m_height
protected

◆ m_type

TSLTerrainVSOutput::dataType TSLTerrainVSOutput::m_type
protected

◆ m_valid

bool TSLTerrainVSOutput::m_valid
protected

Validity flag.

◆ m_width

unsigned int TSLTerrainVSOutput::m_width
protected

Data Members for Class Attributes