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) -> GLKMatrix4Parameters
- eyeX:
The
xcoordinate of the eye position. - eyeY:
The
ycoordinate of the eye position. - eyeZ:
The
zcoordinate of the point position. - centerX:
The
xcoordinate of the point being looked at. - centerY:
The
ycoordinate of the point being looked at. - centerZ:
The
zcoordinate of the point being looked at. - upX:
The
xcoordinate of the camera’s up vector. - upY:
The
ycoordinate of the camera’s up vector. - upZ:
The
zcoordinate 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
GLKMatrix4Make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)GLKMatrix4MakeAndTranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)GLKMatrix4MakeWithArray(_:)GLKMatrix4MakeWithArrayAndTranspose(_:)GLKMatrix4MakeWithColumns(_:_:_:_:)GLKMatrix4MakeWithRows(_:_:_:_:)GLKMatrix4MakeRotation(_:_:_:_:)GLKMatrix4MakeXRotation(_:)GLKMatrix4MakeYRotation(_:)GLKMatrix4MakeZRotation(_:)GLKMatrix4MakeWithQuaternion(_:)GLKMatrix4MakeScale(_:_:_:)GLKMatrix4MakeTranslation(_:_:_:)GLKMatrix4MakeOrtho(_:_:_:_:_:_:)GLKMatrix4MakePerspective(_:_:_:_:)