Click or drag to resize

MarkerBatchPrimitiveSet Method (IEnumerableCartesian, MarkerBatchPrimitiveOptionalParameters)

Defines the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive's ReferenceFrame.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public void Set(
	IEnumerable<Cartesian> positions,
	MarkerBatchPrimitiveOptionalParameters optionalParameters
)

Parameters

positions
Type: System.Collections.GenericIEnumerableCartesian
The new positions for markers in the marker batch.
optionalParameters
Type: AGI.Foundation.GraphicsMarkerBatchPrimitiveOptionalParameters
Optional per-marker parameters corresponding to positions. Each per-marker parameter must have the same number of elements as positions.
Exceptions
ExceptionCondition
ArgumentNullExceptionpositions is null.
ArgumentException Each per-marker parameter in optionalParameters must have the same number of elements as positions.
ArgumentException Cannot provide per-marker sizes because the marker batch was not constructed with MarkerBatchSizeSource.UserDefined.
CouldNotCreateVideoCardResourceException Could not allocate video memory for positions.
Remarks

This call overwrites the primitive's previous markers. To update a subset of markers, use SetPartial(IEnumerableCartesian, IEnumerableInt32).

When a per-marker parameter is not specified in optionalParameters, its corresponding per-batch value is used. For example, if optionalParameters did not have a texture array defined with MarkerBatchPrimitiveOptionalParameters.SetTextures, each marker uses the batch's Texture.

If this method is called frequently, it is recommended to construct the primitive with Frequent, which is the default. If this method will be called only once or infrequently, construct the primitive with Infrequent. See the Set Hint topic for more information.

If the primitive's AutomaticallyComputeBoundingSphere property is , the primitive's BoundingSphere is computed based on positions. Otherwise, it is the caller's responsibility to update the primitive's BoundingSphere to a sphere that encompasses all the positions.

See Also