cesium-native 0.43.0
Loading...
Searching...
No Matches
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
 The current KhrTextureTransformStatus of the transform operation.
 
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.

Member Function Documentation

◆ getTexCoordSetIndex()

std::optional< int64_t > CesiumGltf::KhrTextureTransform::getTexCoordSetIndex ( ) const
inlinenoexcept

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.

Definition at line 76 of file KhrTextureTransform.h.

◆ offset()

glm::dvec2 CesiumGltf::KhrTextureTransform::offset ( ) const
inlinenoexcept

Gets the offset of the texture transform.

Definition at line 46 of file KhrTextureTransform.h.

◆ rotation()

double CesiumGltf::KhrTextureTransform::rotation ( ) const
inlinenoexcept

Gets the rotation (in radians) of the texture transform.

Definition at line 51 of file KhrTextureTransform.h.

◆ rotationSineCosine()

glm::dvec2 CesiumGltf::KhrTextureTransform::rotationSineCosine ( ) const
inlinenoexcept

Gets the sine and cosine of the rotation in the texture transform. This is cached to avoid re-computing the values in the future.

Definition at line 57 of file KhrTextureTransform.h.

◆ scale()

glm::dvec2 CesiumGltf::KhrTextureTransform::scale ( ) const
inlinenoexcept

Gets the scale of the texture transform.

Definition at line 64 of file KhrTextureTransform.h.

◆ status()

KhrTextureTransformStatus CesiumGltf::KhrTextureTransform::status ( ) const
inlinenoexcept

The current KhrTextureTransformStatus of the transform operation.

Definition at line 41 of file KhrTextureTransform.h.


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