Structure

SCNMatrix4

A representation of a 4 x 4 matrix.

Overview

SceneKit uses matrices to represent coordinate space transformations, which in turn can represent the combined position, rotation or orientation, and scale of an object in three-dimensional space.

Topics

Creating Transform Matrices

func SCNMatrix4MakeTranslation(Float, Float, Float)

Returns a matrix describing a translation transformation.

func SCNMatrix4MakeRotation(Float, Float, Float, Float)

Returns a matrix describing a rotation transformation.

func SCNMatrix4MakeScale(Float, Float, Float)

Returns a matrix describing a scale transformation.

Performing Matrix Operations

func SCNMatrix4Translate(SCNMatrix4, Float, Float, Float)

Returns a new matrix created by concatenating the specified matrix with a translation transformation.

func SCNMatrix4Rotate(SCNMatrix4, Float, Float, Float, Float)

Returns a new matrix created by concatenating the specified matrix with a rotation transformation.

func SCNMatrix4Scale(SCNMatrix4, Float, Float, Float)

Returns a new matrix created by concatenating the specified matrix with a scale transformation.

func SCNMatrix4Invert(SCNMatrix4)

Returns the inverse of the specified matrix.

func SCNMatrix4Mult(SCNMatrix4, SCNMatrix4)

Returns the product of two matrices.

Converting Matrix Types

func SCNMatrix4FromGLKMatrix4(GLKMatrix4)

Returns a SceneKit matrix corresponding to a GLKit matrix.

func SCNMatrix4ToGLKMatrix4(SCNMatrix4)

Returns a GLKit matrix corresponding to a SceneKit matrix.

Comparing Matrices

func SCNMatrix4EqualToMatrix4(SCNMatrix4, SCNMatrix4)

Returns a Boolean value that indicates whether the corresponding elements of two matrices are equal.

func SCNMatrix4IsIdentity(SCNMatrix4)

Returns a Boolean value that indicates whether the specified matrix is equal to the identity matrix.

Identity Constant

let SCNMatrix4Identity: SCNMatrix4

The 4 x 4 identity matrix.

See Also

Transforms and Rotations

typealias SCNQuaternion

A representation of a quaternion.