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 right-hand 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 X-axis, and then the Y-axis. The X-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The Y-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the X-axis, and then the Y-axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_XZ_AXES + |
Specifies the X-axis, and then the Z-axis. The X-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The Z-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the X-axis, and then the Z-axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_YX_AXES + |
Specifies the Y-axis, and then the X-axis. The Y-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The X-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the Y-axis, and then the X-axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_YZ_AXES + |
Specifies the Y-axis, and then the Z-axis. The Y-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The Z-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the Y-axis, and then the Z-axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ZX_AXES + |
Specifies the Z-axis, and then the X-axis. The Z-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The X-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the Z-axis, and then the X-axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ZY_AXES + |
Specifies the Z-axis, and then the Y-axis. The Z-axis is specified by Axis1VectorX, Axis1VectorY, and Axis1VectorZ. The Y-axis is approximately specified by Axis2VectorX, Axis2VectorY, and Axis2VectorZ. (summarize)Specifies the Z-axis, and then the Y-axis. (more details...) |
You can add one of the following values to the above-mentioned 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 X-coordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the Y-coordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the Z-coordinate of the new coordinate system's origin, expressed in the working coordinate system.
Specifies the X-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the Y-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the Z-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.
Specifies the approximate X-component of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.
Specifies the approximate Y-component 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. |