Math Functions (Direct3D 10 Graphics)
Note
The D3DX10 utility library is deprecated. We recommend that you use DirectXMath instead.
The math library provided by the D3DX utility library supplies functions to compute 3D mathematical operations. Each of the functions can take the same object as the passed [in] and returned [out] parameters. Also, out parameters are typically returned as return values, so that the output of one math function can be used as a parameter for another math function.
- D3DXColorAdjustContrast
- D3DXColorAdjustSaturation
- D3DXCreateMatrixStack
- D3DXCpuOptimizations
- D3DXFloat16To32Array
- D3DXFloat32To16Array
- D3DXFresnelTerm
- D3DXMatrixAffineTransformation
- D3DXMatrixAffineTransformation2D
- D3DXMatrixDecompose
- D3DXMatrixDeterminant
- D3DXMatrixInverse
- D3DXMatrixLookAtLH
- D3DXMatrixLookAtRH
- D3DXMatrixMultiply
- D3DXMatrixMultiplyTranspose
- D3DXMatrixOrthoLH
- D3DXMatrixOrthoRH
- D3DXMatrixOrthoOffCenterLH
- D3DXMatrixOrthoOffCenterRH
- D3DXMatrixPerspectiveFovLH
- D3DXMatrixPerspectiveFovRH
- D3DXMatrixReflect
- D3DXMatrixRotationAxis
- D3DXMatrixRotationX
- D3DXMatrixRotationY
- D3DXMatrixRotationZ
- D3DXMatrixRotationYawPitchRoll
- D3DXMatrixScaling
- D3DXMatrixShadow
- D3DXMatrixTransformation
- D3DXMatrixTransformation2D
- D3DXMatrixTranslation
- D3DXMatrixTranspose
- D3DXPlaneFromPointNormal
- D3DXPlaneFromPoints
- D3DXPlaneIntersectLine
- D3DXPlaneNormalize
- D3DXPlaneTransform
- D3DXPlaneTransformArray
- D3DXQuaternionBaryCentric
- D3DXQuaternionExp
- D3DXQuaternionInverse
- D3DXQuaternionLn
- D3DXQuaternionMultiply
- D3DXQuaternionNormalize
- D3DXQuaternionRotationAxis
- D3DXQuaternionRotationMatrix
- D3DXQuaternionRotationYawPitchRoll
- D3DXQuaternionSlerp
- D3DXQuaternionSquad
- D3DXQuaternionSquadSetup
- D3DXQuaternionToAxisAngle
- D3DXSHEvalConeLight
- D3DXSHEvalDirection
- D3DXSHEvalDirectionalLight
- D3DXSHEvalHemisphereLight
- D3DXSHMultiply2
- D3DXSHMultiply3
- D3DXSHMultiply4
- D3DXSHMultiply5
- D3DXSHMultiply6
- D3DX10SHProjectCubeMap
- D3DXSHRotate
- D3DXSHRotateZ
- D3DXSHScale
- D3DXVec2BaryCentric
- D3DXVec2CatmullRom
- D3DXVec2Hermite
- D3DXVec2Normalize
- D3DXVec2Transform
- D3DXVec2TransformArray
- D3DXVec2TransformCoord
- D3DXVec2TransformCoordArray
- D3DXVec2TransformNormal
- D3DXVec2TransformNormalArray
- D3DXVec3BaryCentric
- D3DXVec3CatmullRom
- D3DXVec3Hermite
- D3DXVec3Normalize
- D3DXVec3Project
- D3DXVec3ProjectArray
- D3DXVec3Transform
- D3DXVec3TransformArray
- D3DXVec3TransformCoord
- D3DXVec3TransformCoordArray
- D3DXVec3TransformNormal
- D3DXVec3TransformNormalArray
- D3DXVec4BaryCentric
- D3DXVec4CatmullRom
- D3DXVec4Cross
- D3DXVec4Hermite
- D3DXVec4Normalize
- D3DXVec4Transform
- D3DXVec4TransformArray
Resolving Link Errors with D3DX Math Functions
The D3DX math functions are implemented identically in D3DX10 (D3DX10math.h) and D3DX9 (D3DX9math.h). This can cause link errors if a project implements both DirectX 9 and DirectX 10 code, and attempts to link a function from one header with the opposite library.
To eliminate the problem of including both headers, D3DX10math.h includes the following #define:
#ifndef __D3DX9MATH_H__
#define __D3DX9MATH_H__
To eliminate possible link errors, the DX SDK samples link to D3DX9 libraries first (D3DX9d.lib and D3DX9.lib) and then the D3DX10 libraries second (D3DX10d.lib and D3DX10.lib). These settings are under Project/Properties if you are using Visual Studio.
Related topics