setUvTransform method
tx
- offset x
ty
- offset y
sx
- repeat x
sy
- repeat y
rotation
- rotation, in radians. Positive values rotate
counterclockwise
cx
- center x of rotation
cy
- center y of rotation
Sets the UV transform matrix from offset, repeat, rotation, and center.
Implementation
Matrix3 setUvTransform(double tx, double ty, double sx, double sy, double rotation, double cx, double cy) {
final c = math.cos(rotation);
final s = math.sin(rotation);
setValues(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c,
-sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1);
return this;
}