Device.MultiplyTransform(TransformType,Matrix) Method (Microsoft.DirectX.Direct3D)

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

Definition

Visual BasicPublic Sub MultiplyTransform( _
    ByVal state As TransformType, _
    ByVal matrix As Matrix _
)
C#public void MultiplyTransform(
    TransformType state,
    Matrix matrix
);
C++public:
void MultiplyTransform(
    TransformType state,
    Matrix matrix
);
JScriptpublic function MultiplyTransform(
    state : TransformType,
    matrix : Matrix
);

Parameters

state Microsoft.DirectX.Direct3D.TransformType
Member of the TransformType enumerated type that identifies which device matrix to modify. The most common setting, World, modifies the world matrix, but the view or projection matrices also can be modified.
matrix Microsoft.DirectX.Matrix
A Matrix structure that modifies the current transformation.

Remarks

The multiplication order is param_Matrix_matrix x param_TransformType_state.

An application might use the Device.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 C# pseudocode.

[C#]Device.SetTransform(TransformType.World, shoulder_transform);
Device.DrawPrimitive(upper_arm);
Device.MultiplyTransform(TransformType.World, elbow_transform);
Device.DrawPrimitive(lower_arm);
Device.MultiplyTransform(TransformType.World, wrist_transform);
Device.DrawPrimitive(hand);

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
Show: