MIL_ID Matrix3dgeoId,  //in 
MIL_INT64 Mode,  //in 
MIL_DOUBLE OriginX,  //in 
MIL_DOUBLE OriginY,  //in 
MIL_DOUBLE OriginZ,  //in 
MIL_DOUBLE Axis1VectorX,  //in 
MIL_DOUBLE Axis1VectorY,  //in 
MIL_DOUBLE Axis1VectorZ,  //in 
MIL_DOUBLE Axis2VectorX,  //in 
MIL_DOUBLE Axis2VectorY,  //in 
MIL_DOUBLE Axis2VectorZ,  //in 
MIL_INT64 ControlFlag  //in 
This function defines a transformation matrix that can transform points from the working coordinate system into a new specified coordinate system, or vice versa.
The new coordinate system is described by its origin and its orientation with respect to the working coordinate system. The Mode parameter specifies which two axes are used to define the new coordinate system. The first axis is defined using Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The second axis is defined using Axis2VectorX, Axis2VectorY, and Axis2VectorZ. The components of the vector aligned with the second axis can be approximate, since this axis will be internally orthogonalized. However, the second axis must not be parallel to the first axis. The third axis is internally deduced by computing the vector that is orthogonal to the first two axes and respects the righthand rule.
By default, this function returns the transformation matrix that transforms points from the working coordinate system into the new coordinate system. To get the transformation matrix that transforms the points from the new coordinate system into the working coordinate system, use M_BACKWARD_TRANSFORMATION.
Note that the two specified axes must have a magnitude that is greater than 0.
Specifies the identifier of the transformation matrix object, previously allocated on the required system using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.
Specifies which two axes to use to define the new coordinate system. The first letter determines the first axis, and the second letter determines the second axis.
Note that because the second specified axis is internally orthogonalized, the order in which the axes are specified is important. The second specified axis will be moved if it is not already orthogonal to the first specified axis.
For specifying the two axes to use


Value  Description  
M_XY_AXES + 
Specifies the Xaxis, and then the Yaxis. 

M_XZ_AXES + 
Specifies the Xaxis, and then the Zaxis. 

M_YX_AXES + 
Specifies the Yaxis, and then the Xaxis. 

M_YZ_AXES + 
Specifies the Yaxis, and then the Zaxis. 

M_ZX_AXES + 
Specifies the Zaxis, and then the Xaxis. 

M_ZY_AXES + 
Specifies the Zaxis, and then the Yaxis. 
You can add one of the following values to the abovementioned values to specify the direction of the transformation between coordinate systems.
For specifying the direction of the transformation
between coordinate systems


Combination value  Description  
M_DEFAULT 
Same as M_FORWARD_TRANSFORMATION. 

M_BACKWARD_TRANSFORMATION 
Specifies to return the transformation matrix that transforms points from the new coordinate system into the working coordinate system. 

M_FORWARD_TRANSFORMATION 
Specifies to return the transformation matrix that transforms points from the working coordinate system into the new coordinate system. 
Specifies the Xcoordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the Ycoordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the Zcoordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the Xcomponent of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the Ycomponent of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the Zcomponent of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the approximate Xcomponent of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.
Specifies the approximate Ycomponent of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.
Header  Include mil.h. 
Library  Use mil.lib; mil3d.lib. 
DLL  Requires mil.dll; mil3d.dll. 