---
title: "GLKMatrixStackTranslate(_:_:_:_:)"
framework: GLKit
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: "glkit/glkmatrixstacktranslate(_:_:_:_:)"
---

# GLKMatrixStackTranslate(_:_:_:_:)

Replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a translation operation.

## Declaration

```swift
func GLKMatrixStackTranslate(_ stack: GLKMatrixStack, _ tx: Float, _ ty: Float, _ tz: Float)
```

## Parameters

- `stack`: A matrix stack.
- `tx`: The amount to translate the position along the x-axis.
- `ty`: The amount to translate the position along the y-axis.
- `tz`: The amount to translate the position along the z-axis.

## See Also

### Functions

- [GLKMatrixStackCreate(_:)](glkit/glkmatrixstackcreate(_:).md)
- [GLKMatrixStackGetMatrix2(_:)](glkit/glkmatrixstackgetmatrix2(_:).md)
- [GLKMatrixStackGetMatrix3(_:)](glkit/glkmatrixstackgetmatrix3(_:).md)
- [GLKMatrixStackGetMatrix3Inverse(_:)](glkit/glkmatrixstackgetmatrix3inverse(_:).md)
- [GLKMatrixStackGetMatrix3InverseTranspose(_:)](glkit/glkmatrixstackgetmatrix3inversetranspose(_:).md)
- [GLKMatrixStackGetMatrix4(_:)](glkit/glkmatrixstackgetmatrix4(_:).md)
- [GLKMatrixStackGetMatrix4Inverse(_:)](glkit/glkmatrixstackgetmatrix4inverse(_:).md)
- [GLKMatrixStackGetMatrix4InverseTranspose(_:)](glkit/glkmatrixstackgetmatrix4inversetranspose(_:).md)
- [GLKMatrixStackGetTypeID()](glkit/glkmatrixstackgettypeid().md)
- [GLKMatrixStackLoadMatrix4(_:_:)](glkit/glkmatrixstackloadmatrix4(_:_:).md)
- [GLKMatrixStackMultiplyMatrix4(_:_:)](glkit/glkmatrixstackmultiplymatrix4(_:_:).md)
- [GLKMatrixStackMultiplyMatrixStack(_:_:)](glkit/glkmatrixstackmultiplymatrixstack(_:_:).md)
- [GLKMatrixStackPop(_:)](glkit/glkmatrixstackpop(_:).md)
- [GLKMatrixStackPush(_:)](glkit/glkmatrixstackpush(_:).md)
- [GLKMatrixStackRotate(_:_:_:_:_:)](glkit/glkmatrixstackrotate(_:_:_:_:_:).md)
