Function

SCNMatrix4MakeTranslation(_:_:_:)

Returns a matrix describing a translation transformation.

Declaration

iOS, Mac Catalyst, tvOS, watchOS
func SCNMatrix4MakeTranslation(_ tx: Float, _ ty: Float, _ tz: Float) -> SCNMatrix4
macOS
func SCNMatrix4MakeTranslation(_ tx: CGFloat, _ ty: CGFloat, _ tz: CGFloat) -> SCNMatrix4

Parameters

x

The translation distance in the x-axis direction.

y

The translation distance in the y-axis direction.

z

The translation distance in the z-axis direction.

Return Value

A new translation matrix.

See Also

Creating Transform Matrices

func SCNMatrix4MakeRotation(Float, Float, Float, Float) -> SCNMatrix4

Returns a matrix describing a rotation transformation.

func SCNMatrix4MakeScale(Float, Float, Float) -> SCNMatrix4

Returns a matrix describing a scale transformation.