| Customize Help
| Save Settings

M3dgraGrid



Function Map
Synopsis
Add a grid graphic to a 3D graphics list.
Syntax
MIL_INT64 M3dgraGrid(
MIL_ID List3dgraId, //in
MIL_INT64 ParentLabel, //in
MIL_INT64 CreationMode, //in
MIL_ID Matrix3dgeoId, //in
MIL_DOUBLE Param1, //in
MIL_DOUBLE Param2, //in
MIL_DOUBLE Param3, //in
MIL_DOUBLE Param4, //in
MIL_INT64 ControlFlag //in
)
Description

This function adds a grid graphic to the specified 3D graphics list, allowing you to, for example, view the grid graphic on a 3D display.

You must specify the label of the 3D graphic, in the 3D graphics list, to use as the parent of the grid graphic. When the grid graphic is added to the 3D graphics list's tree structure, it is added as a child under the specified parent. If the 3D graphics list is empty, the grid graphic's parent must be the root node.

The grid graphic has its own coordinate system that represents the grid's position and orientation with respect to its parent's coordinate system. The origin of the grid's coordinate system is the grid's center, and its orientation is the grid's orientation. The grid lies on its coordinate system's XY (Z=0) plane. You can set the grid's position and orientation using the Matrix3dgeoId parameter.

To modify or inquire 3D graphics list settings, use M3dgraControl() or M3dgraInquire(), respectively.

Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same MIL 3D graphics list (List3dgraId) without using an M_MUTEX object, as long as all the other parameters of the concurrent calls do not also share data.

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
List3dgraId

Specifies the identifier of the 3D graphics list in which to add the grid graphic.

ParentLabel

Specifies the label of the parent of the grid graphic in the 3D graphics list.

function map For specifying the parent label
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_ROOT_NODE.

Click to summarize M_ROOT_NODE

Specifies the top-most node of the 3D graphics list.

Click to summarize Value >= 0

Specifies the label of the parent of the grid graphic in the 3D graphics list. Label 0 is the 3D graphics list's root node.

(summarize)
CreationMode

Specifies how the grid graphic is defined.

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

Matrix3dgeoId

Specifies the identifier of the transformation matrix that defines the grid graphic's position and orientation with respect to its parent's coordinate system.

function map For specifying the transformation matrix object identifier
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_IDENTITY_MATRIX.

Click to summarize M_IDENTITY_MATRIX

Specifies the identity matrix. This means that the grid graphic's position and orientation is the same as the position and orientation of its parent's coordinate system. The resulting grid is on its parent's coordinate system's XY (Z=0) plane, and is centered on its parent's coordinate system's origin.

(summarize)
Click to summarize MIL transformation matrix object identifier

Specifies the identifier of the transformation matrix that defines the grid graphic's position and orientation with respect to its parent's coordinate system. The transformation matrix must be of type M_RIGID.

(summarize)
Param1

Specifies the first parameter used to define the grid.

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

Param2

Specifies the second parameter used to define the grid.

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

Param3

Specifies the third parameter used to define the grid.

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

Param4

Specifies the fourth parameter used to define the grid.

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

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

The table below lists possible values for the CreationMode, Param1, Param2, Param3, and Param4 parameters.

function map For specifying the grid graphic
Click to summarizeCreationMode Description
Param1
Param2
Param3
Param4
Click to summarize M_SIZE_AND_SPACING

Defines the grid graphic using its size and line spacing. If the specified size is not a multiple of the specified line spacing, the size is rounded down to the nearest multiple of the line spacing. The grid always has at least one cell. If the specified size is smaller than the specified line spacing, there will be a single cell with the dimensions of the line spacing.

(summarize)
Click to summarize Param1

Specifies the grid's size along its coordinate system's X-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's size along its coordinate system's X-axis, in world units.

Click to summarize Param2

Specifies the grid's size along its coordinate system's Y-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's size along its coordinate system's Y-axis, in world units.

Click to summarize Param3

Specifies the grid's line spacing along its coordinate system's X-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's line spacing along its coordinate system's X-axis, in world units.

Click to summarize Param4

Specifies the grid's line spacing along its coordinate system's Y-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's line spacing along its coordinate system's Y-axis, in world units.

Click to summarize M_TILES_AND_SPACING

Defines the grid graphic using its number of cells and line spacing. The grid's size along its coordinate system's X- or Y-axis is equal to the number of cells along the given axis multiplied by the line spacing along the same axis.

(summarize)
Click to summarize Param1

Specifies the grid's number of cells along its coordinate system's X-axis.

(summarize)
Click to summarize Value >= 1

Specifies the grid's number of cells along its coordinate system's X-axis.

Click to summarize Param2

Specifies the grid's number of cells along its coordinate system's Y-axis.

(summarize)
Click to summarize Value >= 1

Specifies the grid's number of cells along its coordinate system's Y-axis.

Click to summarize Param3

Specifies the grid's line spacing along its coordinate system's X-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's line spacing along its coordinate system's X-axis, in world units.

Click to summarize Param4

Specifies the grid's line spacing along its coordinate system's Y-axis.

(summarize)
Click to summarize Value > 0.0

Specifies the grid's line spacing along its coordinate system's Y-axis, in world units.

Return value
Returns the label of the grid graphic added to the 3D graphics list.
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3d.lib.
DLL Requires mil.dll; mil3d.dll.
DEFAULT ROOT NODE DEFAULT IDENTITY MATRIX TRUE SIZE AND SPACING TILES AND SPACING