scale method

scale(, s)

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

Returns


@staticmethod
def scale(s):
    ...
ParameterTypeDescription
sVector3Scaling factories applies to the x-axis, the y-axis and the z-axis

Example

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

from aspose.threed.utilities import Matrix4, Vector3

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

scale(, s)

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

Returns


@staticmethod
def scale(s):
    ...
ParameterTypeDescription
sfloatScaling factories applies to all axex

scale(, sx, sy, sz)

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

Returns


@staticmethod
def scale(sx, sy, sz):
    ...
ParameterTypeDescription
sxfloatScaling factories applies to the x-axis
syfloatScaling factories applies to the y-axis
szfloatScaling factories applies to the z-axis

See Also