ZTransform

@Serializable
class ZTransform(source)

Constructors

Link copied to clipboard
constructor()
constructor(position: ZVector3, rotation: ZQuaternion, scale: ZVector3)

Properties

Link copied to clipboard
Link copied to clipboard

Represents the transformation matrix that defines local transformation of an object in a 3D space.

Link copied to clipboard

Pitch component of rotationEuler in radians.

Link copied to clipboard

pitch expressed in degrees.

Link copied to clipboard

Represents the position of the object in a 3D space.

Link copied to clipboard
Link copied to clipboard
val roll: Float

Roll component of rotationEuler in radians.

Link copied to clipboard

roll expressed in degrees.

Link copied to clipboard

Represents the rotation of the object in a 3D space.

Link copied to clipboard

Represents the rotation of the object using Euler angles in radians. The Euler angles define the rotation about the three principal axes (roll, pitch, yaw).

Link copied to clipboard

Like rotationEuler but ZEuler.roll, ZEuler.pitch, and ZEuler.yaw are expressed in degrees on this API surface only. The returned ZEuler still uses the same fields as radian-backed ZEuler elsewhere—do not pass this value to APIs that expect radians (e.g. ZQuaternion.fromEuler) without converting via Angles.degreesToRadians per component or use rotationEuler instead.

Link copied to clipboard

Represents the scale of the object in a 3D space.

Link copied to clipboard
Link copied to clipboard
val yaw: Float

Yaw component of rotationEuler in radians.

Link copied to clipboard

yaw expressed in degrees.

Functions

Link copied to clipboard
fun lookAt(look: ZVector3)
fun lookAt(look: ZVector3, up: ZVector3)
Link copied to clipboard
fun pan(offset: ZVector2)

fun pan(offsetRight: Float, offsetUp: Float)

Adjusts the position of the object by panning it to the right and up directions.

Link copied to clipboard
fun rotate(angle: Float, axis: ZVector3)
fun rotate(angle: Float, x: Float, y: Float, z: Float)
Link copied to clipboard
fun rotateAround(angle: Float, point: ZVector3, axis: ZVector3)
fun rotateAround(angle: Float, point: ZVector3, axis: ZVector3, through: ZVector3)
Link copied to clipboard
fun rotateAroundDegrees(angle: Float, point: ZVector3, axis: ZVector3)
fun rotateAroundDegrees(angle: Float, point: ZVector3, axis: ZVector3, through: ZVector3)
Link copied to clipboard
fun rotateDegrees(angle: Float, axis: ZVector3)
fun rotateDegrees(angle: Float, x: Float, y: Float, z: Float)
Link copied to clipboard
fun scale(s: Float)
fun scale(v: ZVector3)
fun scale(sx: Float, sy: Float, sz: Float)
Link copied to clipboard
fun setPosition(x: Float, y: Float, z: Float)
Link copied to clipboard
fun setRotation(angle: Float, axis: ZVector3)
fun setRotation(angle: Float, x: Float, y: Float, z: Float)
Link copied to clipboard
fun setRotationDegrees(angle: Float, axis: ZVector3)
fun setRotationDegrees(angle: Float, x: Float, y: Float, z: Float)
Link copied to clipboard
fun translate(x: Float, y: Float, z: Float)