![]() |
VR-Forces Developer's Guide
|
Configuration for an osgEarth ImageLayer used as a spatial sound trigger.
Three sampling modes are supported:
SDF: the layer encodes a normalised signed distance field [0..1]. Pixel 1.0 = deep inside, 0.5 = boundary, 0.0 = far outside. Decoded as: (0.5 - pixel) * 2 * sdfMaxDistanceMeters. Produces smooth fading identical to the polygon featureLayer path.Classification: red channel encodes a discrete class code (0-255). Returns 0.0 when the pixel matches any entry in classValues. Returns DBL_MAX otherwise. Binary on/off - no fading.PolygonizedRaster: thresholds the raster against classValues at LOD 10 and runs GDALPolygonize on a background thread. Results are cached per tile and evicted when the observer moves > 1 degree from the tile centre. Returns DBL_MAX (silent) while the job is pending. Produces smooth fading once polygons are cached. Public Types | |
| enum | Mode { Mode::SDF, Mode::Classification, Mode::PolygonizedRaster } |
Public Attributes | |
| std::string | layerName |
| Mode | mode = Mode::PolygonizedRaster |
| double | sdfMaxDistanceMeters = 500.0 |
| std::vector< std::string > | classValues |
|
strong |
| std::string makVrv::DtRasterSource::layerName |
Name of the osgEarth ImageLayer, e.g. "forest-sdf" or "data:landcover-composite".
Referenced by makVrv::serialize().
| Mode makVrv::DtRasterSource::mode = Mode::PolygonizedRaster |
Sampling mode. Defaults to PolygonizedRaster.
Referenced by makVrv::serialize().
| double makVrv::DtRasterSource::sdfMaxDistanceMeters = 500.0 |
SDF mode only. Physical distance in metres encoded at pixel 0.0. Must be >= fadeDistanceMeters on the channel to avoid clipping the fade.
Referenced by makVrv::serialize().
| std::vector<std::string> makVrv::DtRasterSource::classValues |
Classification and PolygonizedRaster modes. Accepted red-channel values (mapped to integer 0-255 as strings). The trigger is active when the pixel matches any entry (OR logic). An empty list matches nothing.
Referenced by makVrv::serialize().