MIL_ID CalibratedMilObjectId,  //in 
MIL_INT64 TargetCoordinateSystem,  //in 
MIL_INT64 ReferenceCoordinateSystem,  //in 
MIL_INT64 InquireType,  //in 
MIL_ID ArrayBufOrMatrix3dgeoId,  //in 
MIL_DOUBLE *Param1Ptr,  //out 
MIL_DOUBLE *Param2Ptr,  //out 
MIL_DOUBLE *Param3Ptr,  //out 
MIL_DOUBLE *Param4Ptr  //out 
This function returns the position and orientation of one coordinate system as a transformation of another coordinate system. For example, you can use this function to inquire about the position of your camera in the absolute coordinate system; essentially, you can inquire about the origin and orientation of the camera coordinate system with respect to the absolute coordinate system. Note that to move a specified (target) coordinate system relative to a reference coordinate system, you can use McalSetCoordinateSystem().
Note that McalGetCoordinateSystem() returns angles in degrees. However, unlike most other MIL functions, this function returns angles following 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.
Specifies the identifier of a camera calibration context, a 3D reconstruction context of type M_CALIBRATED_CAMERA_LINEAR_MOTION, a 3D reconstruction result buffer of type M_POINT_CLOUD_RESULT, or any object that has camera calibration information, such as an image or a result buffer.
Note that if you specify a 3D reconstruction context, it must have already been calibrated using M3dmapCalibrate() or M3dmapCalibrateMultiple().
Specifies the coordinate system for which to inquire about its position and orientation. This parameter must be set to one of the following values.
Note that if you specify a 3D reconstruction context, it must have already been calibrated using M3dmapCalibrate() or M3dmapCalibrateMultiple(). In this case, TargetCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_LASER_LINE_COORDINATE_SYSTEM.
Note that when CalibratedMilObjectId is set to a 3D reconstruction result buffer, TargetCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_RELATIVE_COORDINATE_SYSTEM.
For specifying the target coordinate
system


Value  Description  
M_ABSOLUTE_COORDINATE_SYSTEM 
Specifies an implicit and unmovable coordinate system from which all other coordinate systems are defined. 

M_CAMERA_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin corresponds to the effective pinhole of the camera and whose Zaxis points in the direction that the camera is facing. 

M_LASER_LINE_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin is on the first laser line at the point closest to the origin of the absolute coordinate system. 

M_RELATIVE_COORDINATE_SYSTEM 
Specifies the coordinate system which determines the world plane used when working with world units which can be recentered and/or reoriented using McalSetCoordinateSystem() or McalRelativeOrigin(). 

M_ROBOT_BASE_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin is positioned at the base of the robot holding the camera. 

M_TOOL_COORDINATE_SYSTEM 
Specifies the coordinate system used to change the position of the camera coordinate system. 
Specifies the coordinate system that will be used as a reference for calculations. All returned coordinates or angles will be calculated relative to this coordinate system. This parameter must be set to one of the following values.
Note that if you specify a 3D reconstruction context, it must have already been calibrated using M3dmapCalibrate() or M3dmapCalibrateMultiple(). In this case, ReferenceCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_LASER_LINE_COORDINATE_SYSTEM.
Note that when CalibratedMilObjectId is set to a 3D reconstruction result buffer, ReferenceCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_RELATIVE_COORDINATE_SYSTEM.
For specifying the reference coordinate
system


Value  Description  
M_DEFAULT 
Same as M_ABSOLUTE_COORDINATE_SYSTEM. 

M_ABSOLUTE_COORDINATE_SYSTEM 
Specifies an implicit and unmovable coordinate system from which all other world coordinate systems are defined. 

M_CAMERA_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin corresponds to the effective pinhole of the camera and whose Zaxis points in the direction that the camera is facing. 

M_LASER_LINE_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin is on the first laser line at the point closest to the origin of the absolute coordinate system. 

M_RELATIVE_COORDINATE_SYSTEM 
Specifies the coordinate system used when working in world units, which can be recentered and/or reoriented using McalSetCoordinateSystem() or McalRelativeOrigin(). 

M_ROBOT_BASE_COORDINATE_SYSTEM 
Specifies the coordinate system whose origin is positioned at the base of the robot holding the camera. 

M_TOOL_COORDINATE_SYSTEM 
Specifies the coordinate system used to change the position of the camera coordinate system. 
Specifies the type of transformation to use to return the location of the target coordinate system with respect to the reference coordinate system.
See the Parameter associations section for possible values that can be specified.
Specifies the identifier of the destination MIL array buffer or transformation matrix object in which to return the matrix representation of the transformation required to cause the reference coordinate system to align with the target coordinate system.
The MIL array buffer must be a 32bit float buffer, previously allocated using MbufAlloc2d() with M_ARRAY. The required buffer size will depend on the results being returned.
The transformation matrix object must have been previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the InquireType and ArrayBufOrMatrix3dgeoId parameters and possible values returned to the Param1Ptr, Param2Ptr, Param3Ptr, and Param4Ptr parameters.
Set unused parameters to M_NULL.
For inquiring about the transformation
parameters


InquireType  Description  
ArrayBufOrMatrix3dgeoId  
Param1Ptr  Possible values returned 

Param2Ptr  Possible values returned 

Param3Ptr  Possible values returned 

Param4Ptr  Possible values returned 

M_HOMOGENEOUS_MATRIX 
Retrieves the transformation which makes the axes of the reference coordinate system parallel to those of the target coordinate system, and makes the origin of the reference coordinate system coincide with that of the target coordinate system. 

ArrayBufOrMatrix3dgeoId 
Returns, into the specified MIL array buffer or transformation matrix object, the matrix representation of the transformation. 

M_ROTATION_AXIS_ANGLE 
Retrieves the axis and angle of rotation which makes the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Xcomponent of the vector which defines the axis of rotation. 

Param2Ptr 
Returns the Ycomponent of the vector which defines the axis of rotation. 

Param3Ptr 
Returns the Zcomponent of the vector which defines the axis of rotation. 

Param4Ptr 
Returns the angle of the rotation around the axis of rotation. 

0 <= Value < 360 
Specifies the rotation angle, in degrees. 

M_ROTATION_AXIS_X 
Retrieves the normalized vector aligned with the Xaxis of the reference coordinate system, expressed in the target coordinate system. 

Param1Ptr 
Returns the Xcomponent of the vector. 

Param2Ptr 
Returns the Ycomponent of the vector. 

Param3Ptr 
Returns the Zcomponent of the vector. 

M_ROTATION_AXIS_Y 
Retrieves the normalized vector aligned with the Yaxis of the reference coordinate system, expressed in the target coordinate system. 

Param1Ptr 
Returns the Xcomponent of the vector. 

Param2Ptr 
Returns the Ycomponent of the vector. 

Param3Ptr 
Returns the Zcomponent of the vector. 

M_ROTATION_AXIS_Z 
Retrieves the normalized vector aligned with the Zaxis of the reference coordinate system, expressed in the target coordinate system. 

Param1Ptr 
Returns the Xcomponent of the vector. 

Param2Ptr 
Returns the Ycomponent of the vector. 

Param3Ptr 
Returns the Zcomponent of the vector. 

M_ROTATION_MATRIX 
Retrieves the rotation matrix that makes the axes of the reference coordinate system parallel to those of the target coordinate system. 

ArrayBufOrMatrix3dgeoId 
Returns, into the specified MIL array buffer or transformation matrix object, the matrix representation of the transformation. 

M_ROTATION_QUATERNION 
Retrieves the components of the quaternion that defines the rotation which makes the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the scalar component of the quaternion. 

Param2Ptr 
Returns the Xcomponent of the quaternion. 

Param3Ptr 
Returns the Ycomponent of the quaternion. 

Param4Ptr 
Returns the Zcomponent of the quaternion. 

M_ROTATION_XYZ 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Xaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees. 

Param2Ptr 
Returns the Yaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Yaxis rotation, in degrees, when located between the positive Zaxis and the positive Xaxis. 

270.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees, when located between the positive Zaxis and the negative Xaxis. 

Param3Ptr 
Returns the Zaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees. 

M_ROTATION_XZY 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Xaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees. 

Param2Ptr 
Returns the Zaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Zaxis rotation, in degrees, when located between the positive Xaxis and the positive Yaxis. 

270.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees, when located between the positive Xaxis and the negative Yaxis. 

Param3Ptr 
Returns the Yaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees. 

M_ROTATION_YXZ 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Yaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees. 

Param2Ptr 
Returns the Xaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Xaxis rotation, in degrees, when located between the positive Yaxis and the positive Zaxis. 

270.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees, when located between the positive Yaxis and the negative Zaxis. 

Param3Ptr 
Returns the Zaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees. 

M_ROTATION_YZX 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Yaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees. 

Param2Ptr 
Returns the Zaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Zaxis rotation, in degrees, when located between the positive Xaxis and the positive Yaxis. 

270.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees, when located between the positive Xaxis and the negative Yaxis. 

Param3Ptr 
Returns the Xaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees. 

M_ROTATION_ZXY 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Zaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees. 

Param2Ptr 
Returns the Xaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Xaxis rotation, in degrees, when located between the positive Yaxis and the positive Zaxis. 

270.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees, when located between the positive Yaxis and the negative Zaxis. 

Param3Ptr 
Returns the Yaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees. 

M_ROTATION_ZYX 
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. 

Param1Ptr 
Returns the Zaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Zaxis rotation, in degrees. 

Param2Ptr 
Returns the Yaxis rotation. 

0.0 <= Value <= 90.0 
Specifies the Yaxis rotation, in degrees, when located between the positive Zaxis and the positive Xaxis. 

270.0 <= Value < 360.0 
Specifies the Yaxis rotation, in degrees, when located between the positive Zaxis and the negative Xaxis. 

Param3Ptr 
Returns the Xaxis rotation. 

0.0 <= Value < 360.0 
Specifies the Xaxis rotation, in degrees. 

M_TRANSLATION 
Retrieves the components of the translation vector that makes the origin of the reference coordinate system coincide with the origin of the target coordinate system. 

Param1Ptr 
Returns the displacement along the Xaxis of the reference coordinate system. 

Param2Ptr 
Returns the displacement along the Yaxis of the reference coordinate system. 

Param3Ptr 
Returns the displacement along the Zaxis of the reference coordinate system. 
Header  Include mil.h. 
Library  Use mil.lib; milcal.lib. 
DLL  Requires mil.dll; milcal.dll. 