translate method

translate(, t)

Creates a matrix that translates along the x-axis, the y-axis and the z-axis

Returns


@staticmethod
def translate(t):
    ...
ParameterTypeDescription
tVector3Translate offset

Example

The following code shows how to create a matrix for translate operation.

from aspose.threed.utilities import Matrix4, Vector3

t = Matrix4.translate(Vector3(10, 0, 0))
pos = Vector3(1, 1, 10)
print(f"Transformed: {t * pos}")

translate(, tx, ty, tz)

Creates a matrix that translates along the x-axis, the y-axis and the z-axis

Returns


@staticmethod
def translate(tx, ty, tz):
    ...
ParameterTypeDescription
txfloatX-coordinate offset
tyfloatY-coordinate offset
tzfloatZ-coordinate offset

See Also