Click or drag to resize

TextBatchPrimitiveSet Method (IEnumerableCartesian, IEnumerableString, TextBatchPrimitiveOptionalParameters)

Defines the positions, text, and optional parameters of strings in a text batch. The strings are rendered in the primitive's ReferenceFrame.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 21.2.409.0 (21.2.409.0)
Syntax
public void Set(
	IEnumerable<Cartesian> positions,
	IEnumerable<string> text,
	TextBatchPrimitiveOptionalParameters optionalParameters
)

Parameters

positions
Type: System.Collections.GenericIEnumerableCartesian
The new positions for strings in the text batch.
text
Type: System.Collections.GenericIEnumerableString
The text for strings in the text batch. Each element in this collection corresponds to an element in positions.
optionalParameters
Type: AGI.Foundation.GraphicsTextBatchPrimitiveOptionalParameters
Optional per-batch parameters or per-string parameters corresponding to positions. Each per-string parameter must have the same number of elements as positions.
Exceptions
ExceptionCondition
ArgumentNullExceptionpositions or text is null.
ArgumentExceptionpositions and text must contain the same number of elements.
CouldNotCreateVideoCardResourceException Could not allocate video memory for positions and text.
Remarks

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

See TextBatchPrimitiveOptionalParameters for details on how to define per-batch and per-string parameters.

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