Microsoft DirectX 8.1 (C++) |
Multiplies a device's world, view, or projection matrices by a specified matrix.
HRESULT MultiplyTransform( D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix );
If the method succeeds, the return value is D3D_OK.
D3DERR_INVALIDCALL if one of the arguments is invalid.
The multiplication order is pMatrix times State.
An application might use the MultiplyTransform method to work with hierarchies of transformations. For example, the geometry and transformations describing an arm might be arranged in the following hierarchy.
shoulder_transformation upper_arm geometry elbow transformation lower_arm geometry wrist transformation hand geometry
An application might use the following series of calls to render this hierarchy. Not all the parameters are shown in this pseudocode.
IDirect3DDevice8::SetTransform(D3DTS_WORLDMATRIX(0), shoulder_transform) IDirect3DDevice8::DrawPrimitive(upper_arm) IDirect3DDevice8::MultiplyTransform(D3DTS_WORLDMATRIX(0), elbow_transform) IDirect3DDevice8::DrawPrimitive(lower_arm) IDirect3DDevice8::MultiplyTransform(D3DTS_WORLDMATRIX(0), wrist_transform) IDirect3DDevice8::DrawPrimitive(hand)
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::DrawPrimitive, IDirect3DDevice8::SetTransform, D3DTS_WORLD, D3DTS_WORLDn, D3DTS_WORLDMATRIX