cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumUtility::AttributeCompression Class Referencefinal

Functions to handle compressed attributes in different formats. More...

#include <CesiumUtility/AttributeCompression.h>

Static Public Member Functions

template<typename T , class = typename std::enable_if<std::is_unsigned<T>::value>::type>
static glm::dvec3 octDecodeInRange (T x, T y, T rangeMax)
 Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.
 
static glm::dvec3 octDecode (uint8_t x, uint8_t y)
 Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.
 
static glm::dvec3 decodeRGB565 (const uint16_t value)
 Decodes a RGB565-encoded color to a 3-component vector containing the normalized RGB values.
 

Detailed Description

Functions to handle compressed attributes in different formats.

Definition at line 12 of file AttributeCompression.h.

Member Function Documentation

◆ decodeRGB565()

static glm::dvec3 CesiumUtility::AttributeCompression::decodeRGB565 ( const uint16_t value)
inlinestatic

Decodes a RGB565-encoded color to a 3-component vector containing the normalized RGB values.

Parameters
valueThe RGB565-encoded value.
Returns
The normalized RGB values.

Definition at line 68 of file AttributeCompression.h.

◆ octDecode()

static glm::dvec3 CesiumUtility::AttributeCompression::octDecode ( uint8_t x,
uint8_t y )
inlinestatic

Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.

Parameters
xThe x component of the oct-encoded unit length vector.
yThe y component of the oct-encoded unit length vector.
Returns
The decoded and normalized vector.
See also
AttributeCompression::octDecodeInRange

Definition at line 56 of file AttributeCompression.h.

◆ octDecodeInRange()

template<typename T , class = typename std::enable_if<std::is_unsigned<T>::value>::type>
static glm::dvec3 CesiumUtility::AttributeCompression::octDecodeInRange ( T x,
T y,
T rangeMax )
inlinestatic

Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.

Parameters
xThe x component of the oct-encoded unit length vector.
yThe y component of the oct-encoded unit length vector.
rangeMaxThe maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
Returns
The decoded and normalized vector.

Definition at line 28 of file AttributeCompression.h.


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