3 #include "CesiumGltf/ExtensionKhrTextureTransform.h"
42 glm::dvec2
offset() const noexcept {
return this->_offset; }
47 double rotation() const noexcept {
return this->_rotation; }
54 return this->_rotationSineCosine;
60 glm::dvec2
scale() const noexcept {
return this->_scale; }
73 return this->_texCoordSetIndex;
81 std::optional<int64_t> _texCoordSetIndex;
84 glm::dvec2 _rotationSineCosine;
A utility class that parses KHR_texture_transform parameters and transforms input texture coordinates...
glm::dvec2 rotationSineCosine() const noexcept
Gets the sine and cosine of the rotation in the texture transform. This is cached to avoid re-computi...
double rotation() const noexcept
Gets the rotation (in radians) of the texture transform.
glm::dvec2 scale() const noexcept
Gets the scale of the texture transform.
std::optional< int64_t > getTexCoordSetIndex() const noexcept
Gets the texture coordinate set index used by this texture transform. If defined, this should overrid...
glm::dvec2 applyTransform(double u, double v) const noexcept
Applies this texture transformation to the input coordinates.
KhrTextureTransform() noexcept
Constructs a texture transformation with identity values.
glm::dvec2 offset() const noexcept
Gets the offset of the texture transform.
Classes for working with glTF models.
KhrTextureTransformStatus
The status of a parsed KHR_texture_transform.
@ Valid
This accessor is valid and ready to use.
glTF extension that enables shifting and scaling UV coordinates on a per-texture basis