I spent five hours of yesterday morning continuing my 3D graphics programming journey. After experimenting with DirectX a little, I knew I needed to refresh my Math a bit. So I fired up the DirectGraphics SDK help files to look for the list of D3DX library’s mathematic functions. This is what I found:
Data Types
D3DXMATRIX – 4x4 (16 floats) MATRIX
D3DVECTOR3 – 3D VECTOR (3 floats)
D3DXPLANE – plane normal (x,y,z) and distance from origin (4 floats)
Matrix and Transformation Functions
D3DXMatrixMultiply – Multiply two 4x4 matrices
D3DXMatrixRotation{X/Y/Z} – build rotation matrices for a particular axis
D3DXMatrixTranslation – create a translation matrix
D3DXMatrixRotationYawPitchRoll – rotate about all axes in one call
D3DXVec3TransformCoord – Multiply 3D vector with a 4x4 Matrix
D3DXVec3TransformNormal – result vector is normalized
D3DXVec3Transform – (x, y, z, 1) -> resulting vector is (x, y, z, w) where w != 1
D3DXVec3Cross – cross product – returns a vector perpendicular to A and B
D3DXVec3Dot – dot product – return as cosine of the angle between two vectors (float)
D3DXVec3Length – determine the magnitude (float) of a vector
D3DXVec3Normalize – Makes vector unit length
Linear Algebra (Matrices and Vectors are part of linear algebra)
GameDev.NET 3D Graphics article/tutorial list
After solidifying my mathematics, I went back to the DirectGraphics SDK help files to examine individual D3DX math functions. With my new found knowledge, I recoded the 3D wire-frame rendering pipeline using matrices and vectors. Later today, I am going to continue this journey with DirectX (my API of choice for now).