TextureMatrixFactory#

class ansys.stk.core.graphics.TextureMatrixFactory#

A 4 by 4 matrix applied to a texture coordinate.

Overview#

initialize

Initialize a texture matrix to the identity matrix.

initialize_by_values

Initialize a texture matrix. The subscripts define [row][column].

initialize_with_affine_transform

Initialize a texture matrix from a matrix. The upper left 2x2 matrix defines rotation and scaling. The top two elements of the last column define translation.

initialize_with_rectangles

Initialize a texture matrix from texture corner points. Normally, a texture is mapped such that the lower left corner is texture coordinate (0, 0), the lower right is (1, 0), the upper right is (1, 1), and the upper left is (0, 1)…

Import detail#

from ansys.stk.core.graphics import TextureMatrixFactory

Method detail#

TextureMatrixFactory.initialize(self) TextureMatrix#

Initialize a texture matrix to the identity matrix.

Returns:

TextureMatrix

TextureMatrixFactory.initialize_by_values(self, m11: float, m12: float, m13: float, m14: float, m21: float, m22: float, m23: float, m24: float, m31: float, m32: float, m33: float, m34: float, m41: float, m42: float, m43: float, m44: float) TextureMatrix#

Initialize a texture matrix. The subscripts define [row][column].

Parameters:

m11 : float

m12 : float

m13 : float

m14 : float

m21 : float

m22 : float

m23 : float

m24 : float

m31 : float

m32 : float

m33 : float

m34 : float

m41 : float

m42 : float

m43 : float

m44 : float

Returns:

TextureMatrix

TextureMatrixFactory.initialize_with_affine_transform(self, matrix: list) TextureMatrix#

Initialize a texture matrix from a matrix. The upper left 2x2 matrix defines rotation and scaling. The top two elements of the last column define translation.

Parameters:

matrix : list

Returns:

TextureMatrix

TextureMatrixFactory.initialize_with_rectangles(self, corner0: list, corner1: list, corner2: list, corner3: list) TextureMatrix#

Initialize a texture matrix from texture corner points. Normally, a texture is mapped such that the lower left corner is texture coordinate (0, 0), the lower right is (1, 0), the upper right is (1, 1), and the upper left is (0, 1)…

Parameters:

corner0 : list

corner1 : list

corner2 : list

corner3 : list

Returns:

TextureMatrix