preprocess
Provides classes to precompute terrain data files.
More...
Classes |
class | proland::InputMap |
| An abstract raster data map. More...
|
Functions |
PROLAND_API void | proland::preprocessDem (InputMap *src, int dstMinTileSize, int dstTileSize, int dstMaxLevel, const string &dstFolder, const string &tmpFolder, float residualScale) |
| Preprocess an elevation map into a file that can be used with a proland::ResidualProducer.
|
PROLAND_API void | proland::preprocessSphericalDem (InputMap *src, int dstMinTileSize, int dstTileSize, int dstMaxLevel, const string &dstFolder, const string &tmpFolder, float residualScale) |
| Preprocess a spherical elevation map into six files that can be used with six proland::ResidualProducer to form a planet.
|
PROLAND_API void | proland::preprocessSphericalAperture (const string &srcFolder, int minLevel, int maxLevel, int samples, const string &dstFolder, const string &tmpFolder) |
| Preprocess a spherical elevation map into six files that can be used with six proland::OrthoCPUProducer to compute terrain shadows with "Ambient Aperture
Lighting", Christopher Oat, Pedro V.
|
PROLAND_API void | proland::preprocessOrtho (InputMap *src, int dstTileSize, int dstChannels, int dstMaxLevel, const string &dstFolder, const string &tmpFolder, float(*rgbToLinear)(float)=NULL, float(*linearToRgb)(float)=NULL) |
| Preprocess a map into files that can be used with a proland::OrthoCPUProducer (and either a proland::OrthoGPUProducer or a proland::OrthoProducer).
|
PROLAND_API void | proland::preprocessSphericalOrtho (InputMap *src, int dstTileSize, int dstChannels, int dstMaxLevel, const string &dstFolder, const string &tmpFolder, float(*rgbToLinear)(float)=NULL, float(*linearToRgb)(float)=NULL) |
| Preprocess a spherical map into files that can be used with a proland::OrthoCPUProducer (and either a proland::OrthoGPUProducer or a proland::OrthoProducer).
|
Detailed Description
Provides classes to precompute terrain data files.
Function Documentation
PROLAND_API void proland::preprocessDem |
( |
InputMap * |
src, |
|
|
int |
dstMinTileSize, |
|
|
int |
dstTileSize, |
|
|
int |
dstMaxLevel, |
|
|
const string & |
dstFolder, |
|
|
const string & |
tmpFolder, |
|
|
float |
residualScale | |
|
) |
| | |
Preprocess an elevation map into a file that can be used with a proland::ResidualProducer.
- Author:
- Eric Bruneton
- Parameters:
-
| src | the map to be preprocessed. Only the x channel is used. |
| dstMinTileSize | the size of the root tile (without borders). E.g., a size of 24 corresponds to a full size of 24+5=29. |
| dstTileSize | the maximum size of the tiles (without borders). E.g., a size of 192 corresponds to a full size of 192+5=197. dstTileSize must be a multiple of dstMinTileSize. |
| dstMaxLevel | the maximum quadtree level to compute. This level is computed from the first tile having the maximum size. E.g., if dstMinTileSize is 24, dstTileSize is 192, and maxLevel is 2, this means that the last computed level will be 5 (level 0 has size 24, level 1 48, level 2 96, level 3 192, level 4 2*192 and level 5 4*192). |
| dstFolder | where the precomputed file must be saved. |
| tmpFolder | where temporary files must be saved. |
| residualScale | the scale factor to use to quantify the residuals in short values. Residuals are divided by this factor before beeing quantified. A small value gives better precision, but can lead to overflows. If you get overflows during the precomputations (i.e. if the maximum residual, indicated in the standard ouput is larger than 65535), retry with a larger value. |
PROLAND_API void proland::preprocessOrtho |
( |
InputMap * |
src, |
|
|
int |
dstTileSize, |
|
|
int |
dstChannels, |
|
|
int |
dstMaxLevel, |
|
|
const string & |
dstFolder, |
|
|
const string & |
tmpFolder, |
|
|
float(*)(float) |
rgbToLinear = NULL , |
|
|
float(*)(float) |
linearToRgb = NULL | |
|
) |
| | |
Preprocess a map into files that can be used with a proland::OrthoCPUProducer (and either a proland::OrthoGPUProducer or a proland::OrthoProducer).
- Author:
- Eric Bruneton
- Parameters:
-
| src | the map to be preprocessed. |
| dstTileSize | the size of the generated tiles (without borders). E.g., a size of 192 corresponds to a full size of 192+4=196. |
| dstChannels | the number of components per pixel in the generated files. |
| dstMaxLevel | the maximum quadtree level to compute. |
| dstFolder | where the precomputed file must be saved. |
| tmpFolder | where temporary files must be saved. |
| rgbToLinear | an optional transformation to transform the colors of the input map into a "linear" space where they can be safely interpolated. For instance, if the input map contains the square root of a reflectance (to get better precision for low values), this function should be the square function. A NULL value indicates the identity function. |
| linearToRgb | an optional transformation, which must be the inverse of 'rgbToLinear'. A NULL value indicates the identity function. |
PROLAND_API void proland::preprocessSphericalAperture |
( |
const string & |
srcFolder, |
|
|
int |
minLevel, |
|
|
int |
maxLevel, |
|
|
int |
samples, |
|
|
const string & |
dstFolder, |
|
|
const string & |
tmpFolder | |
|
) |
| | |
Preprocess a spherical elevation map into six files that can be used with six proland::OrthoCPUProducer to compute terrain shadows with "Ambient Aperture
Lighting", Christopher Oat, Pedro V.
Sander, I3D 2007. WARNING the current implementation of this method only works when 'maxLevel' is such that a tile at this level can be "reasonably" considered as "flat". In practice, maxLevel should be at least 10.
- Author:
- Eric Bruneton
- Parameters:
-
| src | the spherical map to be preprocessed. The x coordinate corresponds to longitudes, and the y coordinate to latitudes (i.e. using the equirectangular projection, aka the equidirectional projection, equidistant cylindrical projection, geographic projection, or plate carrée projection). Only the x channel is used. |
| srcFolder | where the preprocessed elevation map files are stored (these files are supposed to have been generated with preprocessSphericalDem). |
| minLevel | the minimum quadtree level used to sample visibility around a point. This level is computed from the first tile having the maximum size (see proland::preprocessSphericalDem). |
| maxLevel | the maximum quadtree level use to sample visibility around a point. This is also the maximum quadtree level of the produced quadtree. This level is computed from the first tile having the maximum size (see proland::preprocessSphericalDem). |
| samples | the number of samples per direction and per level, used to sample visibility around a point. |
| dstFolder | where the precomputed file must be saved. |
| tmpFolder | where temporary files must be saved. |
PROLAND_API void proland::preprocessSphericalDem |
( |
InputMap * |
src, |
|
|
int |
dstMinTileSize, |
|
|
int |
dstTileSize, |
|
|
int |
dstMaxLevel, |
|
|
const string & |
dstFolder, |
|
|
const string & |
tmpFolder, |
|
|
float |
residualScale | |
|
) |
| | |
Preprocess a spherical elevation map into six files that can be used with six proland::ResidualProducer to form a planet.
- Author:
- Eric Bruneton
- Parameters:
-
| src | the spherical map to be preprocessed. The x coordinate corresponds to longitudes, and the y coordinate to latitudes (i.e. using the equirectangular projection, aka the equidirectional projection, equidistant cylindrical projection, geographic projection, or plate carrée projection). Only the x channel is used. |
| dstMinTileSize | the size of the root tile (without borders). E.g., a size of 24 corresponds to a full size of 24+5=29. |
| dstTileSize | the maximum size of the tiles (without borders). E.g., a size of 192 corresponds to a full size of 192+5=197. dstTileSize must be a multiple of dstMinTileSize. |
| dstMaxLevel | the maximum quadtree level to compute. This level is computed from the first tile having the maximum size. E.g., if dstMinTileSize is 24, dstTileSize is 192, and maxLevel is 2, this means that the last computed level will be 5 (level 0 has size 24, level 1 48, level 2 96, level 3 192, level 4 2*192 and level 5 4*192). |
| dstFolder | where the precomputed file must be saved. |
| tmpFolder | where temporary files must be saved. |
| residualScale | the scale factor to use to quantify the residuals in short values. Residuals are divided by this factor before beeing quantified. A small value gives better precision, but can lead to overflows. If you get overflows during the precomputations (i.e. if the maximum residual, indicated in the standard ouput is larger than 65535), retry with a larger value. |
PROLAND_API void proland::preprocessSphericalOrtho |
( |
InputMap * |
src, |
|
|
int |
dstTileSize, |
|
|
int |
dstChannels, |
|
|
int |
dstMaxLevel, |
|
|
const string & |
dstFolder, |
|
|
const string & |
tmpFolder, |
|
|
float(*)(float) |
rgbToLinear = NULL , |
|
|
float(*)(float) |
linearToRgb = NULL | |
|
) |
| | |
Preprocess a spherical map into files that can be used with a proland::OrthoCPUProducer (and either a proland::OrthoGPUProducer or a proland::OrthoProducer).
- Author:
- Eric Bruneton
- Parameters:
-
| src | the spherical map to be preprocessed. |
| dstTileSize | the size of the generated tiles (without borders). E.g., a size of 192 corresponds to a full size of 192+4=196. |
| dstChannels | the number of components per pixel in the generated files. |
| dstMaxLevel | the maximum quadtree level to compute. |
| dstFolder | where the precomputed file must be saved. |
| tmpFolder | where temporary files must be saved. |
| rgbToLinear | an optional transformation to transform the colors of the input map into a "linear" space where they can be safely interpolated. For instance, if the input map contains the square root of a reflectance (to get better precision for low values), this function should be the square function. A NULL value indicates the identity function. |
| linearToRgb | an optional transformation, which must be the inverse of 'rgbToLinear'. A NULL value indicates the identity function. |