cesium-native  0.41.0
CesiumGltf::KhrTextureTransform Class Reference

A utility class that parses KHR_texture_transform parameters and transforms input texture coordinates. More...

#include <CesiumGltf/KhrTextureTransform.h>

Public Member Functions

 KhrTextureTransform () noexcept
 Constructs a texture transformation with identity values.
 
 KhrTextureTransform (const ExtensionKhrTextureTransform &extension) noexcept
 Constructs a texture transformation from the given extension.
 
KhrTextureTransformStatus status () const noexcept
 
glm::dvec2 offset () const noexcept
 Gets the offset of the texture transform.
 
double rotation () const noexcept
 Gets the rotation (in radians) of the texture transform.
 
glm::dvec2 rotationSineCosine () const noexcept
 Gets the sine and cosine of the rotation in the texture transform. This is cached to avoid re-computing the values in the future.
 
glm::dvec2 scale () const noexcept
 Gets the scale of the texture transform.
 
glm::dvec2 applyTransform (double u, double v) const noexcept
 Applies this texture transformation to the input coordinates.
 
std::optional< int64_t > getTexCoordSetIndex () const noexcept
 Gets the texture coordinate set index used by this texture transform. If defined, this should override the set index of the texture's original textureInfo.
 

Detailed Description

A utility class that parses KHR_texture_transform parameters and transforms input texture coordinates.

Definition at line 25 of file KhrTextureTransform.h.


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