| Customize Help
| Save Settings

M3ddispGetView



Function Map
Synopsis
Get information about the 3D display's view.
Syntax
void M3ddispGetView(
MIL_ID Disp3dId, //in
MIL_INT64 Mode, //in
MIL_DOUBLE *Param1Ptr, //out
MIL_DOUBLE *Param2Ptr, //out
MIL_DOUBLE *Param3Ptr, //out
MIL_INT64 ControlFlag //in
)
Description

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.

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
Disp3dId

Specifies the identifier of the 3D display.

Mode

Specifies which aspect of the view to inquire.

See the Parameter associations section for possible values that can be specified.

Param1Ptr

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.

Param2Ptr

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.

Param3Ptr

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.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

The table below lists possible values for the Mode parameter and possible values returned to the Param1Ptr, Param2Ptr, and Param3Ptr parameters.

function map For determining the position and orientation of the viewpoint.
Click to summarizeMode Description
Param1Ptr
- Possible values returned
Param2Ptr
- Possible values returned
Param3Ptr
- Possible values returned
Click to summarize 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.

(summarize)
Click to summarize Param1Ptr

Returns the azimuth of the view, specified in degrees.

Click to summarize Param2Ptr

Returns the elevation of the view, specified in degrees.

Click to summarize Param3Ptr

Returns the roll of the view, specified in degrees.

Click to summarize 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)
Click to summarize Param1Ptr

Returns the azimuth of the viewpoint relative to the interest point.

Click to summarize M_DISTANCE

Gets the distance of the viewpoint from the interest point.

(summarize)
Click to summarize Param1Ptr

Returns the distance of the viewpoint from the interest point.

Click to summarize 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)
Click to summarize Param1Ptr

Returns the elevation of the viewpoint relative to the interest point.

Click to summarize M_INTEREST_POINT

Gets the position of the interest point.

(summarize)
Click to summarize Param1Ptr

Returns the X-coordinate of the interest point.

Click to summarize Param2Ptr

Returns the Y-coordinate of the interest point.

Click to summarize Param3Ptr

Returns the Z-coordinate of the interest point.

Click to summarize 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)
Click to summarize Param1Ptr

Returns the roll of the view, specified in degrees.

Click to summarize 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)
Click to summarize Param1Ptr

Returns the X-component of the up vector.

Click to summarize Param2Ptr

Returns the Y-component of the up vector.

Click to summarize Param3Ptr

Returns the Z-component of the up vector.

Click to summarize M_VIEW_ORIENTATION

Gets the unit vector that describes the direction from the viewpoint to the interest point.

(summarize)
Click to summarize Param1Ptr

Returns the X-component of the view orientation.

Click to summarize Param2Ptr

Returns the Y-component of the view orientation.

Click to summarize Param3Ptr

Returns the Z-component of the view orientation.

Click to summarize M_VIEWPOINT

Gets the position of the viewpoint.

(summarize)
Click to summarize Param1Ptr

Returns the X-coordinate of the position of the viewpoint.

Click to summarize Param2Ptr

Returns the Y-coordinate of the position of the viewpoint.

Click to summarize Param3Ptr

Returns the Z-coordinate of the position of the viewpoint.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3d.lib.
DLL Requires mil.dll; mil3d.dll.
AZIM ELEV ROLL AZIMUTH DISTANCE ELEVATION INTEREST POINT ROLL UP VECTOR VIEW ORIENTATION VIEWPOINT