A TileProducer to create elevation tiles on CPU from CPU residual tiles. More...
#include <CPUElevationProducer.h>
Public Member Functions | |
CPUElevationProducer (ptr< TileCache > cache, ptr< TileProducer > residualTiles) | |
Creates a new CPUElevationProducer. | |
virtual | ~CPUElevationProducer () |
Deletes this CPUElevationProducer. | |
Static Public Member Functions | |
static float | getHeight (ptr< TileProducer > producer, int level, float x, float y) |
Returns the terrain altitude at a given point, at a given level. | |
Protected Member Functions | |
CPUElevationProducer () | |
Creates an uninitialized CPUElevationProducer. | |
void | init (ptr< TileCache > cache, ptr< TileProducer > residualTiles) |
Initializes this CPUElevationProducer. | |
Private Attributes | |
ptr< TileProducer > | residualTiles |
The producer producing the residual tiles. |
A TileProducer to create elevation tiles on CPU from CPU residual tiles.
proland::CPUElevationProducer::CPUElevationProducer | ( | ptr< TileCache > | cache, | |
ptr< TileProducer > | residualTiles | |||
) |
Creates a new CPUElevationProducer.
cache | the cache to store the produced tiles. The underlying storage must be a CPUTileStorage of float type. | |
residualTiles | the producer producing the residual tiles. This producer should produce its tiles in a CPUTileStorage of float type. The size of the residual tiles (without borders) must be a multiple of the size of the elevation tiles (without borders). |
virtual proland::CPUElevationProducer::~CPUElevationProducer | ( | ) | [virtual] |
Deletes this CPUElevationProducer.
proland::CPUElevationProducer::CPUElevationProducer | ( | ) | [protected] |
Creates an uninitialized CPUElevationProducer.
static float proland::CPUElevationProducer::getHeight | ( | ptr< TileProducer > | producer, | |
int | level, | |||
float | x, | |||
float | y | |||
) | [static] |
Returns the terrain altitude at a given point, at a given level.
The corresponding tile must be in cache before calling this method.
producer | a CPUElevationProducer or an equivalent (i.e. a % producer using an underlying CPUTileStorage of float type). | |
level | level at which we want to get the altitude. | |
x | physical x coordinate of the point to get (in meters from the terrain center). | |
y | physical y coordinate of the point to get (in meters from the terrain center). |
void proland::CPUElevationProducer::init | ( | ptr< TileCache > | cache, | |
ptr< TileProducer > | residualTiles | |||
) | [protected] |
Initializes this CPUElevationProducer.
cache | the cache to store the produced tiles. The underlying storage must be a CPUTileStorage of float type. | |
residualTiles | the producer producing the residual tiles. This producer should produce its tiles in a CPUTileStorage of float type. The size of the residual tiles (without borders) must be a multiple of the size of the elevation tiles (without borders). |
ptr<TileProducer> proland::CPUElevationProducer::residualTiles [private] |
The producer producing the residual tiles.
This producer should produce its tiles in a CPUTileStorage of float type. The size of the residual tiles (without borders) must be a multiple of the size of the elevation tiles (without borders).