Skip to main content

M3dgraText

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Add a text graphic to a 3D graphics list.

Syntax

AIL_INT64 M3dgraText(
AIL_ID List3dgraId, //out
AIL_INT64 ParentLabel, //in
AIL_CONST_TEXT_PTR Text, //in
AIL_ID Matrix3dgeoId, //in
AIL_INT64 Options, //in
AIL_INT64 ControlFlag //in
)

Description

This function adds a text graphic to the specified 3D graphics list, allowing you to, for example, view the text 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 text graphic. When the text 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 text graphic's parent must be the root node.

The text graphic has its own coordinate system that represents the text's position and orientation with respect to its parent's coordinate system. The text is justified at its coordinate system's origin, and is written in the direction of its coordinate system's X-axis, by default, facing the direction of the Z-axis. By default, the text is top- and left-aligned, so the top-left corner of the text is positioned at its coordinate system's origin. You can set the text's position and orientation using the Matrix3dgeoId parameter.

You can set the text's font and size using M3dgraControl with M_FONT and M_FONT_SIZE.

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

Note: Unlike most other functions that modify an Aurora Imaging Library object, you can call this function concurrently from multiple threads on the same Aurora Imaging Library 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.

Parameters

List3dgraId (out, AIL_ID)

Specifies the identifier of the 3D graphics list in which to add the text graphic. The 3D graphics list must have been previously allocated on the required system using M3dgraAlloc, or you can specify the identifier of the 3D display's internal graphics list (inquired using M3ddispInquire with M_3D_GRAPHIC_LIST_ID).

ParentLabel (in, AIL_INT64)

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

For specifying the parent label

ValueDescription
M_DEFAULTSame as M_ROOT_NODE.
M_ROOT_NODESpecifies the top-most node of the 3D graphics list.
Value >= 0Specifies the label of the parent of the text graphic in the 3D graphics list. Label 0 is the 3D graphics list's root node.

Text (in, AIL_CONST_TEXT_PTR)

Specifies the address of the string containing the text that must be shown in the text graphic.

For specifying the string

ValueDescription
"String"Specifies the address of the null-terminated (\0) ASCII string that must be shown in the text graphic. There is no restriction on the length of the string.

Matrix3dgeoId (in, AIL_ID)

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

For specifying the transformation matrix object identifier

ValueDescription
M_DEFAULTSame as M_IDENTITY_MATRIX.
M_IDENTITY_MATRIXSpecifies the identity matrix. This means that the text graphic's position and orientation is the same as the position and orientation of its parent's coordinate system.
Transformation matrix object identifierSpecifies the identifier of the transformation matrix that defines the text graphic's position and rotation with respect to its parent's coordinate system. The transformation matrix must be of type M_RIGID.

Options (in, AIL_INT64)

Specifies extra options for the appearance of the text graphic.

For specifying extra options

ValueDescription
M_DEFAULTSpecifies that the text is written in the direction of the text graphic's coordinate system's X-axis, and that the text faces the direction of the Z-axis of the text graphic's coordinate system.[Image: 3dgra_text_option_default.png]
M_FIXED_ROTATIONSpecifies that the text is rotated with the display. The text will always face the viewpoint of the display. This is used to keep text readable regardless of the rotation of the display.
M_FIXED_SCALESpecifies that the text is scaled with respect to the display. The text will always appear at the same scale regardless of the zoom or translation of the display. When using this mode, use M3dgraControl with M_FIXED_FONT_SIZE to change the font size.
M_FLIPSpecifies that the text is mirrored across the X-axis. The text faces the direction of the negative Z-axis of the text graphic's coordinate system.[Image: 3dgra_text_option_flip.png]

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Return Value

Type: AIL_INT64

Returns the label of the text graphic added to the 3D graphics list.

Copyright © 2026 Zebra Technologies.