lovr.math.newTransform

A transform is a 4x4, column major matrix that can be used to represent the 3D transform of an object. Most graphics primitives accept a Transform instead of the usual coordinate arguments. Transforms provide a convenient way to represent translation, rotation, and scale in a single object.

transform = lovr.math.newTransform(x, y, z, sx, sy, sz, angle, ax, ay, az)

Arguments

NameTypeDescription
xnumberThe x position of the Transform.
ynumberThe x position of the Transform.
znumberThe x position of the Transform.
sxnumberThe x scale of the Transform.
synumberThe y scale of the Transform.
sznumberThe z scale of the Transform.
anglenumberThe number of radians the Transform is rotated around its axis of rotation.
axnumberThe x component of the axis of rotation.
aynumberThe y component of the axis of rotation.
aznumberThe z component of the axis of rotation.

Returns

NameTypeDescription
transformTransformThe new Transform.

See also