Platform SDK: DirectX |
The Direct3DDevice7.MultiplyTransform method multiplies a device's world, view, or projection matrices by a specified matrix. The multiplication order is matrix times dstTransformStateType.
object.MultiplyTransform( _ dstTransformStateType As CONST_D3DTRANSFORMSTATETYPE, _ matrix As D3DMATRIX)
If the method fails, an error is raised and Err.Number will be set. The method returns DDERR_INVALIDPARAMS if one of the parameters is invalid.
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 of the parameters are shown in this pseudocode.)
Direct3DDevice7.SetTransform(D3DTRANSFORMSTATE_WORLD, shoulder_transform) Direct3DDevice7.DrawPrimitive(upper_arm) Direct3DDevice7.MultiplyTransform(D3DTRANSFORMSTATE_WORLD, elbow_transform) Direct3DDevice7.DrawPrimitive(lower_arm) Direct3DDevice7.MultiplyTransform(D3DTRANSFORMSTATE_WORLD, wrist_transform) Direct3DDevice7.DrawPrimitive(hand)