Microsoft DirectX 8.1 (Visual Basic) |
Multiplies a device's world, view, or projection matrices by a specified matrix.
object.MultiplyTransform( _ TransformType As CONST_D3DTRANSFORMSTATETYPE, _ Matrix As D3DMATRIX)
If the method fails, an error is raised and Err.Number will be set. The method returns D3DERR_INVALIDCALL if one of the parameters is invalid.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
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.)
Direct3DDevice8.SetTransform(D3DTS_WORLD, shoulder_transform) Direct3DDevice8.DrawPrimitive(upper_arm) Direct3DDevice8.MultiplyTransform(D3DTS_WORLD, elbow_transform) Direct3DDevice8.DrawPrimitive(lower_arm) Direct3DDevice8.MultiplyTransform(D3DTS_WORLD, wrist_transform) Direct3DDevice8.DrawPrimitive(hand)