Contents

GLKMatrix4MakeLookAt(_:_:_:_:_:_:_:_:_:)

Returns a 4x4 matrix that transforms world coordinates to eye coordinates.

Declaration

func GLKMatrix4MakeLookAt(_ eyeX: Float, _ eyeY: Float, _ eyeZ: Float, _ centerX: Float, _ centerY: Float, _ centerZ: Float, _ upX: Float, _ upY: Float, _ upZ: Float) -> GLKMatrix4

Parameters

  • eyeX:

    The x coordinate of the eye position.

  • eyeY:

    The y coordinate of the eye position.

  • eyeZ:

    The z coordinate of the point position.

  • centerX:

    The x coordinate of the point being looked at.

  • centerY:

    The y coordinate of the point being looked at.

  • centerZ:

    The z coordinate of the point being looked at.

  • upX:

    The x coordinate of the camera’s up vector.

  • upY:

    The y coordinate of the camera’s up vector.

  • upZ:

    The z coordinate of the camera’s up vector.

Return Value

A newly initialized view matrix.

Discussion

This function creates a matrix in a way similar to the gluLookAt function previously provided in OpenGL ES 1.1.

See Also

Creating Matrices