Kuesa Runtime

TextureTransform Class

class Kuesa::TextureTransform

Kuesa::TextureTransform provides an easy to use texture transform implementation. Given an offset, a rotation and a scale, it produces a matrix that can be directly pushed to a shader and used to transform uv coordinates. More...

Header: #include <Kuesa/TextureTransform>
Since: Kuesa 1.3
Instantiated By: TextureTransform

This class was introduced in Kuesa 1.3.

Properties

Public Functions

QMatrix3x3 matrix() const
const QVector2D &offset() const
float rotation() const
const QVector2D &scale() const

Public Slots

void setOffset(const QVector2D &offset)
void setRotation(float rotation)
void setScale(const QVector2D &scale)

Signals

void offsetChanged(const QVector2D &offset)
void rotationChanged(float rotation)
void scaleChanged(const QVector2D &scale)

Detailed Description

On top of Kuesa::TextureTransform, Kuesa implements KHR_texture_transform

See also Kuesa::MetallicRoughnessProperties and https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform.

Property Documentation

matrix : const QMatrix3x3

This property was introduced in Kuesa 1.3.

Access functions:

QMatrix3x3 matrix() const

offset : QVector2D

This property was introduced in Kuesa 1.3.

Access functions:

const QVector2D &offset() const
void setOffset(const QVector2D &offset)

Notifier signal:

void offsetChanged(const QVector2D &offset)

rotation : float

This property was introduced in Kuesa 1.3.

Access functions:

float rotation() const
void setRotation(float rotation)

Notifier signal:

void rotationChanged(float rotation)

scale : QVector2D

This property was introduced in Kuesa 1.3.

Access functions:

const QVector2D &scale() const
void setScale(const QVector2D &scale)

Notifier signal:

void scaleChanged(const QVector2D &scale)