MIL_ID SrcContainerBufOrGeometry3dgeoId,  //in 
MIL_ID DstContainerBufOrGeometry3dgeoId,  //in 
MIL_INT64 RotationType,  //in 
MIL_DOUBLE Param1,  //in 
MIL_DOUBLE Param2,  //in 
MIL_DOUBLE Param3,  //in 
MIL_DOUBLE Param4,  //in 
MIL_DOUBLE CenterX,  //in 
MIL_DOUBLE CenterY,  //in 
MIL_DOUBLE CenterZ,  //in 
MIL_INT64 ControlFlag  //in 
This function applies the specified rotation to the 3D points in a point cloud container or to the geometry in a 3D geometry object.
If the source is a point cloud container, M3dimRotate() applies the specified rotation to the coordinates in the M_COMPONENT_RANGE component. If a M_COMPONENT_NORMALS_MIL component exists in the source container, it is recalculated and added to the destination container, along with the modified M_COMPONENT_RANGE component. The source container's M_COMPONENT_CONFIDENCE component is copied to the destination container. If M_COMPONENT_REFLECTANCE and M_COMPONENT_MESH_MIL components exist in the source, they are also copied to the destination. Any previously existing M_COMPONENT_NORMALS_MIL, M_COMPONENT_REFLECTANCE, or M_COMPONENT_MESH_MIL components are removed from the destination container.
Note that all angles should be specified 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.
Note that, when rotating a point cloud, this function affects the coordinates of the points and not their storage location in the container.
Specifies the source point cloud container or 3D geometry object.
Note that the source and destination must match so that both are containers or both are 3D geometries.
For specifying the source container or 3D geometry
object identifier


Value  Description  
M_XY_PLANE 
Specifies the XY (Z=0) plane. 

Source 3D geometry object identifier 
Specifies the identifier of the source 3D geometry object. 

Source container identifier 
Specifies the identifier of the source point cloud container. 
Specifies the destination container or 3D geometry object.
Note that the source and destination must match so that both are containers or both are 3D geometries.
For specifying the destination container or 3D
geometry object identifier


Value  Description  
Destination 3D geometry object identifier 
Specifies the identifier of the destination 3D geometry object, previously allocated using M3dgeoAlloc() with M_GEOMETRY. 

Destination container identifier 
Specifies the identifier of the destination container, previously allocated using MbufAllocContainer() with M_PROC. 
Specifies the type of rotation to apply to the point cloud or 3D geometry.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the rotation. Its definition is dependent on the type of rotation selected.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the rotation. Its definition is dependent on the type of rotation selected.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the rotation. Its definition is dependent on the type of rotation selected.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the rotation. Its definition is dependent on the type of rotation selected.
See the Parameter associations section for possible values that can be specified.
Specifies the Xcoordinate of the point around which the rotation is performed.
To specify the volumetric center point when rotating a 3D geometry, set this parameter to M_GEOMETRY_CENTER. To specify the volumetric center point or center of mass when rotating a point cloud, calculate (using M3dimStat()) and then retrieve (using M3dimGetResult()) the required bounding box (M_BOX_CENTER_...) or centroid (M_CENTROID_...) statistics (respectively), and then pass these coordinates to the CenterX, CenterY and CenterZ parameters.
For specifying the Xcoordinate value


Value  Description  
M_DEFAULT 
Specifies the default value; the default value is 0.0. 

M_GEOMETRY_CENTER 
Specifies the 3D geometry's center point. 

Value 
Specifies the Xcoordinate value. 
Specifies the Ycoordinate of the point around which the rotation is performed. If the CenterX parameter is set to M_GEOMETRY_CENTER, set this parameter to M_DEFAULT.
Specifies the Zcoordinate of the point around which the rotation is performed. If the CenterX parameter is set to M_GEOMETRY_CENTER, set this parameter to M_DEFAULT.
The table below lists possible values for the RotationType, Param1, Param2, Param3, and Param4 parameters.
For specifying the rotation type


RotationType  Description  
Param1  
Param2  
Param3  
Param4  
M_ROTATION_AXIS_ANGLE 
Specifies a rotation described by an axis and angle of rotation. 

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. 

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. 

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. 

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. 

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. 

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. 

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. 

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. 

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. 

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. 

Param1 
Specifies the Zaxis rotation, in degrees. 

Param2 
Specifies the Yaxis rotation, in degrees. 

Param3 
Specifies the Xaxis rotation, in degrees. 
Header  Include mil.h. 
Library  Use mil.lib; mil3dim.lib. 
DLL  Requires mil.dll; mil3dim.dll. 