| Customize Help
| Save Settings

M3dgraCopy



Function Map
Synopsis
Copy an object into or out of a 3D graphics list.
Syntax
MIL_INT64 M3dgraCopy(
MIL_ID SrcMilObjectId, //in
MIL_INT64 SrcLabel, //in
MIL_ID DstMilObjectId, //in
MIL_INT64 DstLabel, //in
MIL_INT64 CopyType, //in
MIL_INT64 ControlFlag //in
)
Description

This function copies an object into or out of a 3D graphics list.

You can copy a 3D graphic's geometry or transformation matrix, a point cloud's LUT buffer, or a 3D graphics list's bounding box or clipping box.

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
SrcMilObjectId

Specifies the identifier of the source object. Note that if the source object is not a 3D graphics list, the destination object must be.

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

SrcLabel

Specifies the label of the 3D graphic in SrcMilObjectId, when the source object is a 3D graphics list.

If a label is not required, set this parameter to M_DEFAULT.

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

DstMilObjectId

Specifies identifier of the destination object. Note that if the destination object is not a 3D graphics list, the source object must be.

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

DstLabel

Specifies the label of the 3D graphic in DstMilObjectId, when the destination object is a 3D graphics list.

If a label is not required, set this parameter to M_DEFAULT.

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

CopyType

Specifies the type of copy operation.

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 SrcMilObjectId, SrcLabel, DstMilObjectId, DstLabel, and CopyType parameters.

function map For specifying the copy type
Click to summarizeCopyType Description
SrcMilObjectId
SrcLabel
DstMilObjectId
DstLabel
Click to summarize M_BOUNDING_BOX

Specifies to copy the bounding box of the entire 3D graphics list into a 3D box geometry object.

(summarize)
Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies that the bounding box is of the entire 3D graphics list.

(summarize)
Click to summarize M_LIST

Specifies that the 3D graphics list itself is the source object.

Click to summarize DstMilObjectId

Specifies the identifier of the 3D geometry object. The 3D geometry object must have been previously allocated using M3dgeoAlloc() with M_GEOMETRY.

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize M_CLIPPING_BOX

Specifies to set the clipping box of the 3D graphics list, or copy a clipping box out of a 3D graphics list. The clipping box is used to clip 3D graphics with infinite size, such as infinite planes and cylinders, upon their creation.

(summarize)
Click to summarize M_WHOLE_SCENE

Specifies to set the destination 3D graphics list's entire bounding box as its clipping box.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies that the clipping box is of the entire 3D graphics list.

(summarize)
Click to summarize M_LIST

Specifies that the 3D graphics list itself is the destination object.

Click to summarize 3D geometry object ID to use to define

Specifies the identifier of the 3D box geometry object to use to set the clipping box of the 3D graphics list. The 3D geometry object must have been previously allocated using M3dgeoAlloc() with M_GEOMETRY, and defined as a box.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies that the clipping box is of the entire 3D graphics list.

(summarize)
Click to summarize M_LIST

Specifies that the 3D graphics list itself is the source object.

Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list from which to copy the clipping box. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies that the clipping box is of the entire 3D graphics list.

(summarize)
Click to summarize M_LIST

Specifies that the 3D graphics list itself is the source object.

Click to summarize DstMilObjectId

Specifies the identifier of the 3D geometry object in which to copy the clipping box. The 3D geometry object must have been previously allocated using M3dgeoAlloc() with M_GEOMETRY.

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize M_COLOR_LUT +

Specifies to copy the LUT or to set the LUT associated with a point cloud in a 3D graphics list. When M3dgraControl() with M_COLOR_USE_LUT is set to M_TRUE, the values of the point cloud's component used for color are mapped to a color in the associated LUT. You can set the component used to color the point cloud using M3dgraControl() with M_COLOR_COMPONENT.

(summarize)
Click to summarize M_NULL

Specifies to remove the current LUT of a point cloud in a 3D graphics list.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list.

Click to summarize M_COLORMAP_HOT +

Specifies to use a predefined LUT buffer with a hot colormap as the LUT of a point cloud in a 3D graphics list. The predefined LUT buffer has 3 bands and has a size of 65536. The colormap transitions from black, to red, to yellow, and then, to white along the RGB cube as the indices increase. This colormap can be useful for displaying infrared images.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize M_COLORMAP_HUE +

Specifies to use a predefined LUT buffer with a hue colormap as the LUT of a point cloud in a 3D graphics list. The predefined LUT buffer has 3 bands and has a size of 65536. The colormap transitions from red, to yellow, to green, to cyan, to blue, to magenta, and then, to red along the edge of the hue circle as the indices increase. This colormap is useful for displaying the hue component of an HSL image.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize M_COLORMAP_JET +

Specifies to use a predefined LUT buffer with a jet colormap as the LUT of a point cloud in a 3D graphics list. The predefined LUT buffer has 3 bands and has a size of 65536. The colormap transitions from dark blue, to blue, to cyan, to yellow, to red, and then, to dark red along the RGB cube as the indices increase. This colormap can be useful for displaying 3D elevation maps and thermal imaging.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize M_COLORMAP_SPECTRUM +

Specifies to use a predefined LUT buffer with a spectrum colormap as the LUT of a point cloud in a 3D graphics list. The predefined LUT buffer has 3 bands and has a size of 65536. The colormap transitions from red, to yellow, to green, to blue, and then, to violet along the RGB cube as the indices increase. This colormap is a representation of the visual spectrum according to wavelengths. It can also be useful for displaying 3D elevation maps and thermal imaging.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize M_COLORMAP_TURBO +

Specifies to use a predefined LUT buffer with a turbo colormap as the LUT of a point cloud in a 3D graphics list. The predefined LUT buffer has 3 bands and has a size of 65536. The colormap transitions from dark blue, to blue, to cyan, to yellow, to red, and then, to dark red along the RGB cube as the indices increase. This colormap is similar to M_COLORMAP_JET, but with smoother transitions.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list containing the point cloud from which to copy the LUT. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies the label of the point cloud in the source 3D graphics list whose LUT to use.

If the point cloud is not associated with a LUT, an error is generated.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the LUT buffer in which to copy the LUT. The LUT buffer must have been previously allocated using MbufAlloc1d() or MbufAllocColor() with M_LUT.

This LUT buffer must have the same size and number of bands as the LUT to be copied.

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize LUT buffer ID to use to define

Specifies the identifier of the LUT buffer from which to copy the LUT. The LUT buffer must have been previously allocated using MbufAlloc1d() or MbufAllocColor() with M_LUT. Only 8-bit unsigned LUT buffers are supported.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the point cloud. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the point cloud in the destination 3D graphics list whose LUT to set.

Click to summarize M_COLOR_TEXTURE

Specifies to copy or set the texture of a polygon graphic in a 3D graphics list.

(summarize)
Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list containing the polygon graphic from which to copy the texture. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

Note that using this copy type with a polygon graphic that does not have a texture will cause an error.

(summarize)
Click to summarize SrcLabel

Specifies the label of the polygon graphic in the source 3D graphics list from which to copy the texture.

Click to summarize DstMilObjectId

Specifies the identifier of the image buffer in which to copy the polygon graphic's texture. The image buffer must be an 8-bit, unsigned buffer, and must have the same size and number of bands as the current texture in the polygon graphic. You can inquire the size and number of bands of a polygon graphic's texture using M3dgraInquire() M_COLOR_TEXTURE_SIZE....

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize Image buffer ID to use to define

Specifies the identifier of the image buffer to use to set a polygon graphic's texture. The image buffer must be an 8-bit, unsigned, 1- or 3-band buffer. If the polygon graphic does not already have a texture, MIL sets the texture mapping automatically. If the polygon graphic already has a texture, the image buffer must have the same size and number of bands as the texture being replaced. Otherwise, an error is generated.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the polygon graphic whose texture to set. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the polygon graphic in the destination 3D graphics list whose texture to set.

Click to summarize M_GEOMETRY +

Specifies to copy a 3D graphic's geometry into a 3D geometry object, using its parent's coordinate system as a frame of reference. The 3D graphic must be of type box, cylinder, line, plane, or sphere.

(summarize)
Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list containing the 3D graphic. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies the label of the 3D graphic in the source 3D graphics list.

Click to summarize DstMilObjectId

Specifies the identifier of the 3D geometry object in which to copy the 3D graphic's geometry. The 3D geometry object must have been previously allocated using M3dgeoAlloc() with M_GEOMETRY.

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize M_GRAPHIC +

Specifies to copy a 3D graphic from a source 3D graphics list into a destination 3D graphics list. If the combination value M_CHILDREN_ONLY is not specified, M3dgraCopy() returns the label of the 3D graphic copied into the destination 3D graphics list.

(summarize)
Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list containing the 3D graphic. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies the label of the 3D graphic in the source 3D graphics list to copy.

Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list in which to copy the 3D graphic. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the 3D graphic that will be the parent of the 3D graphic copied into the destination 3D graphics list.

Click to summarize M_TRANSFORMATION_MATRIX +

Specifies to copy or set the transformation matrix of a 3D graphic.

(summarize)
Click to summarize M_IDENTITY_MATRIX

Specifies to reset the transformation matrix of the 3D graphic to the identity matrix.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the 3D graphic whose transformation matrix to set. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the 3D graphic in the destination 3D graphics list whose transformation matrix to set. You can specify any node except for the root node.

(summarize)
Click to summarize 3D graphics list ID from which to copy

Specifies the identifier of the 3D graphics list containing the 3D graphic from which to copy the transformation matrix. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize SrcLabel

Specifies the label of the 3D graphic in the source 3D graphics list from which to copy the transformation matrix.

Click to summarize DstMilObjectId

Specifies the identifier of the transformation matrix object in which to copy the 3D graphic's transformation matrix. The transformation matrix object must have been previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.

(summarize)
Click to summarize DstLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize Transformation matrix object ID to use to
define

Specifies the identifier of the transformation matrix object to use as a 3D graphic's transformation matrix. The transformation matrix object must have been previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX. The transformation matrix must be of type M_RIGID.

(summarize)
Click to summarize SrcLabel

This parameter must be set to M_DEFAULT.

(summarize)
Click to summarize DstMilObjectId

Specifies the identifier of the 3D graphics list containing the 3D graphic whose transformation matrix to set. The 3D graphics list must either be associated with a 3D display, or must have been previously allocated using M3dgraAlloc(). You can inquire the identifier of the 3D graphics list associated with a display using M3ddispInquire() with M_3D_GRAPHIC_LIST_ID.

(summarize)
Click to summarize DstLabel

Specifies the label of the 3D graphic in the destination 3D graphics list whose transformation matrix to set. You can specify any node except for the root node.

(summarize)
Combination value for M_COLOR_LUT.

You can add the following value to the above-mentioned value to set the LUT of a point cloud in the destination 3D graphics list, and all of its point cloud children in the 3D graphics list recursively.

function map For setting a LUT recursively
Click to summarizeCombination value Description
Click to summarize M_RECURSIVE

Sets the LUT of the point cloud specified by the DstLabel parameter, and all of its point cloud children in the 3D graphics list recursively.

Combination values for M_GRAPHIC.

You can add one of the following values to the above-mentioned value to specify how to copy the 3D graphic.

function map For specifying how to copy the 3D graphic
Click to summarizeCombination value Description
Click to summarize M_CHILDREN_ONLY

Specifies to copy the 3D graphic's descendants into the destination 3D graphics list, without copying the 3D graphic itself. The 3D graphic's children are directly copied into the destination 3D graphics list as children of the 3D graphic with label DstLabel, and the rest of the descendants are copied recursively.

Note that in this case, M3dgraCopy() returns M_INVALID.

(summarize)
Click to summarize M_RECURSIVE

Specifies to copy the 3D graphic, and all of its descendants in the 3D graphics list recursively.

Combination value for M_GEOMETRY.

You can add the following value to the above-mentioned value to specify how to copy the geometry.

function map For specifying how to copy the 3D graphic's geometry
Click to summarizeCombination value Description
Click to summarize M_RELATIVE_TO_ROOT

Specifies to copy the geometry using its relative position and orientation to the 3D graphics list's root node.

Combination values for M_TRANSFORMATION_MATRIX.

You can add one of the following values to the above-mentioned value to specify how to copy the transformation matrix.

function map For specifying how to copy the transformation matrix
Click to summarize
Combination value
Description
Click to summarize M_COMPOSE_WITH_CURRENT

Specifies to compose the 3D graphic object's transformation matrix with the source transformation matrix. The DstMilObjectId parameter must be a 3D graphics list identifier.

(summarize)
Click to summarize M_RELATIVE_TO_ROOT

Specifies to copy or set the position and orientation of a 3D graphic relative to the 3D graphics list's root node.

Combination value for M_COLORMAP_HOT (when CopyType=M_COLOR_LUT); M_COLORMAP_HUE (when CopyType=M_COLOR_LUT); M_COLORMAP_JET (when CopyType=M_COLOR_LUT); M_COLORMAP_SPECTRUM (when CopyType=M_COLOR_LUT); M_COLORMAP_TURBO (when CopyType=M_COLOR_LUT).

You can add the following value to the above-mentioned values to specify that the LUT should be flipped.

function map For specifying to flip the LUT
Click to summarizeCombination value Description
Click to summarize M_FLIP

Specifies to flip the LUT's values (inverse LUT).

Return value
Returns the label of the 3D graphic copied into the destination 3D graphics list. If the copy type does not return a new label in the destination 3D graphics list, this function returns M_NO_LABEL.
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3d.lib.
DLL Requires mil.dll; mil3d.dll.
BOUNDING BOX LIST DEFAULT CLIPPING BOX WHOLE SCENE DEFAULT LIST BOX DEFAULT LIST LIST DEFAULT COLOR LUT NULL DEFAULT COLORMAP HOT DEFAULT COLORMAP HUE DEFAULT COLORMAP JET DEFAULT COLORMAP SPECTRUM DEFAULT COLORMAP TURBO DEFAULT DEFAULT UNSIGNED DEFAULT COLOR TEXTURE GRAPHIC TYPE POLYGON UNSIGNED DEFAULT UNSIGNED DEFAULT GRAPHIC TYPE POLYGON GEOMETRY DEFAULT GRAPHIC TRANSFORMATION MATRIX IDENTITY MATRIX DEFAULT DEFAULT TRUE DEFAULT RECURSIVE CHILDREN ONLY RECURSIVE RELATIVE TO ROOT COMPOSE WITH CURRENT RELATIVE TO ROOT FLIP