MIL_ID Disp3dId, | //in |
MIL_INT64 Mode, | //in |
MIL_DOUBLE *Param1Ptr, | //out |
MIL_DOUBLE *Param2Ptr, | //out |
MIL_DOUBLE *Param3Ptr, | //out |
MIL_INT64 ControlFlag | //in |
This function gets information about the current view of the specified 3D display.
All settings of the view of a 3D display are based on the viewpoint, interest point, and/or up vector, as shown in the image below:
You can get the position of the viewpoint using M_VIEWPOINT, the position of the interest point using M_INTEREST_POINT and the direction of the up-vector using M_UP_VECTOR. The results of all other modes are derived from these modes. For example, the M_ROLL setting of the view is derived from the M_UP_VECTOR setting.
All results are returned with respect to the working coordinate system of the 3D display.
Specifies which aspect of the view to inquire.
See the Parameter associations section for possible values that can be specified.
Specifies the address of the variable in which to write either the X-coordinate, distance, azimuth, elevation, or roll.
See the Parameter associations section for possible values that can be returned.
Specifies the address of the variable in which to write either the Y-coordinate or elevation.
Set this parameter to M_NULL if not used.
See the Parameter associations section for possible values that can be returned.
Specifies the address of the variable in which to write either the Z-coordinate or roll.
Set this parameter to M_NULL if not used.
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the Mode parameter and possible values returned to the Param1Ptr, Param2Ptr, and Param3Ptr parameters.
For determining the position and orientation of the
viewpoint.
|
|||||||||||||||||||||||||||||||||||||||
Mode | Description | ||||||||||||||||||||||||||||||||||||||
Param1Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
Param2Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
Param3Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AZIM_ELEV_ROLL |
Gets the azimuth and elevation of the viewpoint relative to the interest point, and the roll of the view. These are the viewpoint position and up vector, described in a spherical coordinate system (additionally described by M_DISTANCE). Azimuth is the angle of the viewpoint relative to the interest point on the XY-plane. An azimuth of 0 corresponds to a view where the viewpoint and interest point are parallel to the X-axis on the XY-plane, with the viewpoint on the positive side. Increasing values for the azimuth correspond to rotating the view counter-clockwise around the interest point. Elevation is the angle of the viewpoint relative to the interest point on the XZ-plane. An elevation of 0 corresponds to a view where the viewpoint and interest point are parallel to the X-axis on the XZ-plane, with the viewpoint on the positive side. Increasing values for the elevation correspond to rotating the view counter-clockwise around the interest point in the XZ-plane. Roll is the angle that describes how much the view is rotated to the right. A roll of 0 corresponds to a view for which up is positive on the Z-axis. Gets the azimuth and elevation of the viewpoint relative to the interest point, and the roll of the view. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the azimuth of the view, specified in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the elevation of the view, specified in degrees. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the roll of the view, specified in degrees. |
||||||||||||||||||||||||||||||||||||||
M_AZIMUTH |
Gets the azimuth of the viewpoint relative to the interest point. Azimuth is the angle of the viewpoint relative to the interest point on the XY-plane. An azimuth of 0 corresponds to a view where the viewpoint and interest point are parallel to the X-axis on the XY-plane, with the viewpoint on the positive side. Increasing values for the azimuth correspond to rotating the view counter-clockwise around the interest point. (summarize)Gets the azimuth of the viewpoint relative to the interest point. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the azimuth of the viewpoint relative to the interest point. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE |
Gets the distance of the viewpoint from the interest point. (summarize)Gets the distance of the viewpoint from the interest point. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the distance of the viewpoint from the interest point. |
||||||||||||||||||||||||||||||||||||||
M_ELEVATION |
Gets the elevation of the viewpoint relative to the interest point. Elevation is the angle of the viewpoint relative to the interest point on the XZ-plane. An elevation of 0 corresponds to a view where the viewpoint and interest point are parallel to the X-axis on the XZ-plane, with the viewpoint on the positive side. Increasing values for the elevation correspond to rotating the view counter-clockwise around the interest point in the XZ-plane. (summarize)Gets the elevation of the viewpoint relative to the interest point. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the elevation of the viewpoint relative to the interest point. |
||||||||||||||||||||||||||||||||||||||
M_INTEREST_POINT |
Gets the position of the interest point. (summarize)Gets the position of the interest point. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-coordinate of the interest point. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-coordinate of the interest point. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-coordinate of the interest point. |
||||||||||||||||||||||||||||||||||||||
M_ROLL |
Gets the roll of the view. This is an angle which defines what direction the top of the view will be pointing, with 0 degrees specifying that the view will be perfectly level. As this value increases, the view rolls to the right. (summarize)Gets the roll of the view. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the roll of the view, specified in degrees. |
||||||||||||||||||||||||||||||||||||||
M_UP_VECTOR |
Gets the vector which defines what direction the top of the view is pointing. Note that this setting will always return a unit vector that is orthogonal to the current orientation of the view. The value returned by this function will therefore typically be different from the up vector that you might have previously specified using M3ddispSetView() with M_UP_VECTOR. (summarize)Gets the vector which defines what direction the top of the view is pointing. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-component of the up vector. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-component of the up vector. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-component of the up vector. |
||||||||||||||||||||||||||||||||||||||
M_VIEW_ORIENTATION |
Gets the unit vector that describes the direction from the viewpoint to the interest point. (summarize)Gets the unit vector that describes the direction from the viewpoint to the interest point. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-component of the view orientation. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-component of the view orientation. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-component of the view orientation. |
||||||||||||||||||||||||||||||||||||||
M_VIEWPOINT |
Gets the position of the viewpoint. (summarize)Gets the position of the viewpoint. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-coordinate of the position of the viewpoint. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-coordinate of the position of the viewpoint. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-coordinate of the position of the viewpoint. |
Header | Include mil.h. |
Library | Use mil.lib; mil3d.lib. |
DLL | Requires mil.dll; mil3d.dll. |