translate method

translate

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

Returns

def translate(self, 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

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

Returns

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

See Also