MIL_ID Matrix3dgeoId,  //in 
MIL_INT64 TransformType,  //in 
MIL_DOUBLE Param1,  //in 
MIL_DOUBLE Param2,  //in 
MIL_DOUBLE Param3,  //in 
MIL_DOUBLE Param4,  //in 
MIL_INT64 ControlFlag  //in 
This function assigns a transformation to a transformation matrix object or composes a transformation with a transformation matrix object. The transformation can be defined as a translation, rotation, scale, or the result of a matrix composition.
Note that all angles should be given in degrees. However, unlike most other MIL functions, angles are interpreted using the righthand grip rule around the axis of rotation; if you wrap your right hand around the axis of rotation, pointing your thumb in the positive direction of the axis, your fingers wrap in the direction of rotation. For example, a positive rotation around the Zaxis corresponds to a rotation that turns the positive Xaxis toward the positive Yaxis.
All coordinates are expressed in world units in the working coordinate system.
Specifies the identifier of the transformation matrix object. The transformation matrix object must have been previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.
Specifies the type of transformation to apply.
See the Parameter associations section for possible values that can be specified.
Specifies the first parameter used to define the transformation matrix.
See the Parameter associations section for possible values that can be specified.
Specifies the second parameter used to define the transformation matrix.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies the third parameter used to define the transformation matrix.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies the fourth parameter used to define the transformation matrix.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies how to apply the transformation.
For specifying how to apply the
transformation


Value  Description  
M_DEFAULT 
Same as M_ASSIGN. 

M_ASSIGN 
Specifies to assign the specified transformation to the given transformation matrix object. 

M_COMPOSE_WITH_CURRENT 
Specifies to compose the specified transformation with the given matrix. 
The table below lists possible values for the TransformType, Param1, Param2, Param3, and Param4 parameters.
Set unused parameters to M_DEFAULT.
For specifying the transformation type


TransformType  Description  
Param1  
Param2  
Param3  
Param4  
M_COMPOSE_TWO_MATRICES 
Specifies the transformation resulting from the composition of two matrices. 

Param1 
Specifies the first source matrix (that is, source matrix A). 

M_IDENTITY_MATRIX 
Specifies the identity matrix. 

MIL transformation matrix object identifier 
Specifies the identifier of a transformation matrix object. 

Param2 
Specifies the second source matrix (that is, source matrix B). 

M_IDENTITY_MATRIX 
Specifies the identity matrix. 

MIL transformation matrix object identifier 
Specifies the identifier of a transformation matrix object. 

M_FIXTURE_TO_GEOMETRY 
Specifies a transformation that can move the working coordinate system to a 3D geometry object. 

Param1 
Specifies a 3D geometry object. 

MIL 3D box geometry object identifier 
Specifies a 3D box geometry object identifier previously allocated using M3dgeoAlloc() with M_GEOMETRY and successfully defined as a box. 

MIL 3D cylinder geometry object identifier 
Specifies a 3D cylinder geometry object identifier previously allocated using M3dgeoAlloc() with M_GEOMETRY and successfully defined as a cylinder. 

MIL 3D plane geometry object identifier 
Specifies a 3D plane geometry object identifier previously allocated using M3dgeoAlloc() with M_GEOMETRY and successfully defined as a plane. 

MIL 3D sphere geometry object identifier 
Specifies a 3D sphere geometry object identifier previously allocated using M3dgeoAlloc() with M_GEOMETRY and successfully defined as a sphere. 

M_FIXTURE_TO_PLANE 
Specifies a transformation that can move the XY (Z=0) plane of the working coordinate system to a plane specified by Param1. 

Param1 
Specifies a 3D geometry plane. 

M_XY_PLANE 
Specifies the XY (Z=0) plane. 

MIL 3D geometry object identifier 
Specifies a 3D plane geometry object identifier previously allocated using M3dgeoAlloc() with M_GEOMETRY and successfully defined as a plane. 

Param2 
Specifies the Xcoordinate of a point on the plane where the origin will be moved. 

Param3 
Specifies the Ycoordinate of a point on the plane where the origin will be moved. 

Param4 
Specifies the Zcoordinate of a point on the plane where the origin will be moved. 

M_IDENTITY 
Specifies the identity transformation. 

M_INVERSE 
Specifies the inverse transformation. 

Param1 
Specifies the source matrix. 

MIL transformation matrix object identifier 
Specifies the identifier of a transformation matrix object previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX. 

M_ROTATION_AXIS_ANGLE 
Specifies a rotation described by an axis and angle of rotation. INQ 

Param1 
Specifies the Xcomponent of the vector that defines the axis of rotation. 

Param2 
Specifies the Ycomponent of the vector that defines the axis of rotation. 

Param3 
Specifies the Zcomponent of the vector that defines the axis of rotation. 

Param4 
Specifies the angle of the rotation, in degrees, around the axis of rotation. 

M_ROTATION_AXIS_X 
Specifies the minimal rotation that can align the working coordinate system's Xaxis with the specified vector. INQ 

Param1 
Specifies the Xcomponent of the vector. 

Param2 
Specifies the Ycomponent of the vector. 

Param3 
Specifies the Zcomponent of the vector. 

M_ROTATION_AXIS_Y 
Specifies the minimal rotation that can align the working coordinate system's Yaxis with the specified vector. INQ 

Param1 
Specifies the Xcomponent of the vector. 

Param2 
Specifies the Ycomponent of the vector. 

Param3 
Specifies the Zcomponent of the vector. 

M_ROTATION_AXIS_Z 
Specifies the minimal rotation that can align the working coordinate system's Zaxis with the specified vector. INQ 

Param1 
Specifies the Xcomponent of the vector. 

Param2 
Specifies the Ycomponent of the vector. 

Param3 
Specifies the Zcomponent of the vector. 

M_ROTATION_QUATERNION 
Specifies a rotation operation that is described by a rotation quaternion. INQ 

Param1 
Specifies the scalar component of the quaternion. 

Param2 
Specifies the Xcomponent of the quaternion. 

Param3 
Specifies the Ycomponent of the quaternion. 

Param4 
Specifies the Zcomponent of the quaternion. 

M_ROTATION_X 
Specifies a rotation operation around the Xaxis. 

Param1 
Specifies the Xaxis rotation, in degrees. 

M_ROTATION_XYZ 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Xaxis, a rotation about the Yaxis, and a rotation about the Zaxis rotation. INQ 

Param1 
Specifies the Xaxis rotation, in degrees. 

Param2 
Specifies the Yaxis rotation, in degrees. 

Param3 
Specifies the Zaxis rotation, in degrees. 

M_ROTATION_XZY 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Xaxis, a rotation about the Zaxis, and a rotation about the Yaxis rotation. INQ 

Param1 
Specifies the Xaxis rotation, in degrees. 

Param2 
Specifies the Zaxis rotation, in degrees. 

Param3 
Specifies the Yaxis rotation, in degrees. 

M_ROTATION_Y 
Specifies a rotation operation around the Yaxis. 

Param1 
Specifies the Yaxis rotation, in degrees. 

M_ROTATION_YXZ 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Yaxis, a rotation about the Xaxis, and a rotation about the Zaxis rotation. INQ 

Param1 
Specifies the Yaxis rotation, in degrees. 

Param2 
Specifies the Xaxis rotation, in degrees. 

Param3 
Specifies the Zaxis rotation, in degrees. 

M_ROTATION_YZX 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Yaxis, a rotation about the Zaxis, and a rotation about the Xaxis rotation. INQ 

Param1 
Specifies the Yaxis rotation, in degrees. 

Param2 
Specifies the Zaxis rotation, in degrees. 

Param3 
Specifies the Xaxis rotation, in degrees. 

M_ROTATION_Z 
Specifies a rotation operation around the Zaxis. 

Param1 
Specifies the Zaxis rotation, in degrees. 

M_ROTATION_ZXY 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Zaxis, a rotation about the Xaxis, and a rotation about the Yaxis rotation. INQ 

Param1 
Specifies the Zaxis rotation, in degrees. 

Param2 
Specifies the Xaxis rotation, in degrees. 

Param3 
Specifies the Yaxis rotation, in degrees. 

M_ROTATION_ZYX 
Specifies a rotation that is described by three distinct rotations about the axes of the working coordinate system in the following order: a rotation about the Zaxis, a rotation about the Yaxis, and a rotation about the Xaxis rotation. INQ 

Param1 
Specifies the Zaxis rotation, in degrees. 

Param2 
Specifies the Yaxis rotation, in degrees. 

Param3 
Specifies the Xaxis rotation, in degrees. 

M_SCALE 
Specifies a scaling operation. INQ 

Param1 
Specifies the scaling factor in X. 

Param2 
Specifies the scaling factor in Y. 

Param3 
Specifies the scaling factor in Z. 

M_TRANSLATION 
Specifies a translation along each of the axes of the working coordinate system. INQ 

Param1 
Specifies the displacement along the Xaxis. 

Param2 
Specifies the displacement along the Yaxis. 

Param3 
Specifies the displacement along the Zaxis. 
Header  Include mil.h. 
Library  Use mil.lib; mil3d.lib. 
DLL  Requires mil.dll; mil3d.dll. 