| Customize Help
| Save Settings

M3dgraSphere



Function Map
Synopsis
Add a sphere graphic to a 3D graphics list.
Syntax
MIL_INT64 M3dgraSphere(
MIL_ID List3dgraId, //in
MIL_INT64 ParentLabel, //in
MIL_DOUBLE CenterX, //in
MIL_DOUBLE CenterY, //in
MIL_DOUBLE CenterZ, //in
MIL_DOUBLE Radius, //in
MIL_INT64 ControlFlag //in
)
Description

This function adds a sphere graphic to the specified 3D graphics list, allowing you to, for example, view the sphere 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 sphere graphic. When the sphere 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 sphere graphic's parent must be the root node. All coordinates are expressed in the coordinate system of the sphere graphic's parent.

The sphere graphic has its own coordinate system that represents the sphere graphic's position and orientation with respect to its parent's coordinate system. The origin of the sphere graphic's coordinate system is the sphere graphic's center, and its orientation is inherited, upon creation, from its parent's coordinate system. This means that the sphere graphic's orientation is the same as the orientation of its parent's coordinate system.

Note that although a sphere graphic's coordinate system has an orientation, the orientation has no effect on the appearance of the sphere graphic.

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 sphere graphic.

ParentLabel

Specifies the label of the parent of the sphere 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 sphere graphic in the 3D graphics list. Label 0 is the 3D graphics list's root node.

(summarize)
CenterX

Specifies the X-coordinate of the center of the sphere graphic.

CenterY

Specifies the Y-coordinate of the center of the sphere graphic.

CenterZ

Specifies the Z-coordinate of the center of the sphere graphic.

Radius

Specifies the sphere graphic's radius.

function map For specifying the sphere graphic's radius
Click to summarizeValue Description
Click to summarize Value > 0.0

Specifies the sphere graphic's radius.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Return value
Returns the label of the sphere 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