| Customize Help
| Save Settings

M3dgeoMatrixSetWithAxes



Function Map
Synopsis
Defines a transformation matrix that can transform points from the working coordinate system into the specified coordinate system, or vice versa.
Syntax
void M3dgeoMatrixSetWithAxes(
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
)
Description

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.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
Matrix3dgeoId

Specifies the identifier of the transformation matrix object, previously allocated on the required system using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.

Mode

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.

function map For specifying the two axes to use
Click to summarizeValue Description
Click to summarize 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)
Click to summarize 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)
Click to summarize 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)
Click to summarize 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)
Click to summarize 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)
Click to summarize 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)
Combination values for the values listed in For specifying the two axes to use.

You can add one of the following values to the above-mentioned values to specify the direction of the transformation between coordinate systems.

function map For specifying the direction of the transformation between coordinate systems
Click to summarizeCombination value Description
Click to summarize M_DEFAULT

Same as M_FORWARD_TRANSFORMATION.

Click to summarize M_BACKWARD_TRANSFORMATION

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

Click to summarize M_FORWARD_TRANSFORMATION

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

OriginX

Specifies the X-coordinate of the new coordinate system's origin, expressed in the working coordinate system.

OriginY

Specifies the Y-coordinate of the new coordinate system's origin, expressed in the working coordinate system.

OriginZ

Specifies the Z-coordinate of the new coordinate system's origin, expressed in the working coordinate system.

Axis1VectorX

Specifies the X-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.

Axis1VectorY

Specifies the Y-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.

Axis1VectorZ

Specifies the Z-component of the vector aligned with the new coordinate system's first axis, expressed in the working coordinate system.

Axis2VectorX

Specifies the approximate X-component of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.

Axis2VectorY

Specifies the approximate Y-component of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.

Axis2VectorZ

Specifies the approximate Z-component of the vector aligned with the new coordinate system's second axis, expressed in the working coordinate system.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3d.lib.
DLL Requires mil.dll; mil3d.dll.
XY AXES XZ AXES YX AXES YZ AXES ZX AXES ZY AXES DEFAULT BACKWARD TRANSFORMATION FORWARD TRANSFORMATION