Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.ElevationUtility Class Reference

Utility methods to help with the manipulation of elevation data. More...

Static Public Member Functions

static float[] DecodeEsriLERCToFloat (byte[] elevation)
 Decodes a byte array in Esri Limited Error Raster Compression(LERC) format into an array of elevation values.
 
static byte[] EncodeToRGBBytes (float[] elevation, int width, int height, float minElevation=Elevation.MIN_ELEVATION)
 Encodes an array of elevation values, to texture RGB byte array.
 
static void AddRGBToByteArray (byte r, byte g, byte b, byte[] rgbElevation, int index)
 Add RGB bytes to a byte array.
 
static float DecodeToFloat (byte r, byte g, byte b, float minElevation=Elevation.MIN_ELEVATION)
 Decode RGB bytes to elevation value.
 
static void EncodeToRGBByte (float elevation, out byte r, out byte g, out byte b, float minElevation=Elevation.MIN_ELEVATION)
 Encode an elevation value to RGB bytes.
 

Detailed Description

Utility methods to help with the manipulation of elevation data.

Member Function Documentation

◆ AddRGBToByteArray()

static void DepictionEngine.ElevationUtility.AddRGBToByteArray ( byte  r,
byte  g,
byte  b,
byte[]  rgbElevation,
int  index 
)
static

Add RGB bytes to a byte array.

Parameters
rRed byte value.
gGreen byte value.
bBlue byte value.
rgbElevationThe byte array to which we add the RGB values
indexThe starting index in the array at which to insert the RGB values.

◆ DecodeEsriLERCToFloat()

static float[] DepictionEngine.ElevationUtility.DecodeEsriLERCToFloat ( byte[]  elevation)
static

Decodes a byte array in Esri Limited Error Raster Compression(LERC) format into an array of elevation values.

Parameters
elevationElevation values, in Esri Limited Error Raster Compression(LERC) format.
Returns
An array of elevation values in world unit.
Exceptions
InvalidOperationException

◆ DecodeToFloat()

static float DepictionEngine.ElevationUtility.DecodeToFloat ( byte  r,
byte  g,
byte  b,
float  minElevation = Elevation::MIN_ELEVATION 
)
static

Decode RGB bytes to elevation value.

Parameters
rRed byte value.
gGreen byte value.
bBlue byte value.
minElevationThe lowest point supported by the elevation encoding mode.
Returns
An Elevation value, in world units.

◆ EncodeToRGBByte()

static void DepictionEngine.ElevationUtility.EncodeToRGBByte ( float  elevation,
out byte  r,
out byte  g,
out byte  b,
float  minElevation = Elevation::MIN_ELEVATION 
)
static

Encode an elevation value to RGB bytes.

Parameters
elevationAn elevation value, in world units.
rRed byte value.
gGreen byte value.
bBlue byte value.
minElevationThe lowest point supported by the elevation encoding mode.

◆ EncodeToRGBBytes()

static byte[] DepictionEngine.ElevationUtility.EncodeToRGBBytes ( float[]  elevation,
int  width,
int  height,
float  minElevation = Elevation::MIN_ELEVATION 
)
static

Encodes an array of elevation values, to texture RGB byte array.

Parameters
elevationElevation values, in world units.
widthWidth of the texture.
heightHeight of the texture.
minElevationThe lowest point supported by the elevation encoding mode.
Returns
A texture byte array.

The documentation for this class was generated from the following file: