The interface to a compositor object, for use by the TSLTerrainViewShed Algorithm class.
The compositor is reponsible for converting the output of the viewshed operations and the application-specific output format. It may use the provided TSLTerrainVSOutput classes, or define its own format.
If multiple viewshed operations are performed simultaneously, any calculation/cumulation of result data is performed by this object.
An application may inherit from this object, in order to use application-specific result calculation/storage classes.
This object is reference counted. If the application is finished with it, the dec() method should be called.
This method is called by the viewshed algorithm, each time a point has been processed.
The compositor is responsible for interpreting these results, performing any required calculations, and storing the data.
- Parameters
-
x | The x offset of the point, from the bottom-left of the input data. |
y | The y offset of the point, from the bottom-left of the input data. |
visibility | An enum which specifies whether this point is visible/not visible from the centre of the viewshed, or that there was no input data available for this point. |
terrainHeight | The height of the terrain at this point, read from the input object. |
viewshedParameters | The parameters of the current viewshed operation. |
Implemented in TSLTerrainVSCompositorCumulativeVisibility, and TSLTerrainVSCompositorVisibility.
This method will be called by the viewshed algorithm, to provide the compositor with a mechanism for initialisation, and an opportunite to terminate the viewshed calculation if required.
The map unit extent that the viewshed will be calculated for can be retrieved via params.m_viewShedMUExtent. This may not be the same as the input object's extent, or the requested extent (based on center point and maxRadius).
- Parameters
-
params | The parameters of the viewshed operation. |
- Returns
- If this method true, the viewshed calculation will proceed. If false the viewshed calculation will terminate, and an error will be logged on the error stack.
Implemented in TSLTerrainVSCompositorCumulativeVisibility, and TSLTerrainVSCompositorVisibility.