Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.MultiplyTransform

Multiplies a device's world, view, or projection matrices by a specified matrix.

object.MultiplyTransform( _ 
    TransformType As CONST_D3DTRANSFORMSTATETYPE, _ 
    Matrix As D3DMATRIX)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
TransformType
Member of the CONST_D3DTRANSFORMSTATETYPE enumeration that identifies which device matrix is to be modified. The most common setting, D3DTS_WORLD, modifies the world matrix, but you can specify that the method modify the view or projection matrices, if needed.
Matrix
A D3DMATRIX type that modifies the current transformation.

Error Codes

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.

Remarks

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)

See Also

Direct3DDevice8.DrawPrimitive, Direct3DDevice8.SetTransform