Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
can code matrix translate something units the axis

Can code matrix translate something units the axis

76

Chapter 3: 3D Mathematics

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:

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Tonya Lara

PageId: DOCAC0D61C