Can code matrix translate something units the axis
| 76 |
|
|---|
Code sample:
Matrix Translation
You already know translation is about moving stuff from one place to another. Matrices can be used to encode a translation. For exam-ple, we can code a matrix to translate something by 5 units on the X axis, 3 units on the Y axis, and 2 units on the Z axis. Then we can pick one or more objects, say a bunch of vertices, and transform them by our matrix.
| Chapter 3: 3D Mathematics |
|---|
The syntax and parameters for D3DXMatrixTranslation can be seen below. An example follows.
D3DXMATRIX *WINAPI D3DXMatrixTranslation (
[in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
FLOAT x
[in] Z-coordinate offset.
Code sample:


