---
name: "get_translation_matrix"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/get_translation_matrix"
---

# get\_translation\_matrix(3alleg)

Constructs a translation matrix. Allegro game programming library.

## NAME

get\_translation\_matrix, get\_translation\_matrix\_f - Constructs a translation matrix. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void get\_translation\_matrix(MATRIX \*m, fixed x, fixed y, fixed z);**

**void get\_translation\_matrix\_f(MATRIX\_f \*m, float x, float y, float z);**

## DESCRIPTION

Constructs a translation matrix, storing it in m. When applied to the  point (px, py, pz), this matrix will produce the point (px+x, py+y,  pz+z). In other words, it moves things sideways.

## SEE ALSO

[**apply\_matrix**(3alleg)](/apply_matrix/3alleg.md), [**get\_transformation\_matrix**(3alleg)](/get_transformation_matrix/3alleg.md), [**qtranslate\_matrix**(3alleg)](/qtranslate_matrix/3alleg.md), [**exstars**(3alleg)](/exstars/3alleg.md)
