Click or drag to resize

TextBatchPrimitive Class

Renders one or more strings in the 3D scene.

For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance topic.

Inheritance Hierarchy
SystemObject
  AGI.Foundation.GraphicsPrimitive
    AGI.Foundation.GraphicsTextBatchPrimitive

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public sealed class TextBatchPrimitive : Primitive

The TextBatchPrimitive type exposes the following members.

Constructors
  NameDescription
Public methodTextBatchPrimitive(GraphicsFont)
Initializes a marker batch primitive with the specified font. This is equivalent to constructing a text batch with the specified font and a SetHint of Frequent.
Public methodTextBatchPrimitive(GraphicsFont, SetHint)
Initializes a marker batch primitive with the specified font and setHint.
Public methodTextBatchPrimitive(GraphicsFont, SetHint, Boolean)
Initializes a text batch primitive with the specified font and setHint, optimized for 2d screen space rendering.
Top
Properties
  NameDescription
Public propertyAlignToPixel
Gets or sets whether the screen space position of each string is aligned to a pixel.
Public propertyAutomaticallyComputeBoundingSphere
Gets or sets if the primitive's BoundingSphere is automatically computed.
(Inherited from Primitive.)
Public propertyBoundingSphere
Gets or sets the bounding sphere that encompasses the primitive. The center is defined in the primitive's ReferenceFrame.
(Inherited from Primitive.)
Public propertyBoundingSphereScale
Gets or sets the scale applied to the radius of this primitive's bounding sphere.
Public propertyColor
Gets or sets the color that affects every string in the batch.
(Overrides PrimitiveColor.)
Public propertyDisplay
Gets or sets if the primitive should be rendered. Both this and DisplayCondition must evaluate to true for the primitive to be rendered.
(Inherited from Primitive.)
Public propertyDisplayCondition
Gets or sets the display condition that determines if the primitive should be rendered. Both this and Display must evaluate to true for the primitive to be rendered.
(Inherited from Primitive.)
Public propertyDistanceDisplayConditionPerString
Gets or sets a DistanceDisplayCondition that is evaluated per string in the text batch during rendering. This is different than DisplayCondition, which is evaluated once for the entire text batch. When DistanceDisplayConditionPerString is null, no per string display condition is evaluated.
Public propertyFont
Gets the font used to render the text batch.
Public propertyOutlineColor
Gets or sets the text's outline color.
Public propertyOutlineTranslucency
Gets or sets the text's outline translucency. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.
Public propertyPerItemCullingEnabled
Gets or sets whether individual text indices will be culled individually.
Public propertyPerItemPickingEnabled
Gets or sets whether individual text indices will be included in the PickResults returned from the Scene's Pick method. Each text index that is picked will be returned as a BatchPrimitiveIndex.
Public propertyReferenceFrame
Gets or sets the reference frame this primitive is defined and rendered in.
(Inherited from Primitive.)
Public propertyRenderInScreenSpace
Gets or sets whether the primitive is positioned and rendered in screen space coordinates.
Public propertySetHint
Gets the primitive's SetHint. See the Set Hint topic for more information on selecting an appropriate value to construct the primitive with.
Public propertyTag
Gets or sets custom data associated with this primitive.
(Inherited from Primitive.)
Public propertyTextureFilter
Gets or sets the filter used to filter the texture-based Font.
Public propertyTranslucency
Gets or sets the translucency that affects every string in the batch. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.
(Overrides PrimitiveTranslucency.)
Top
Methods
  NameDescription
Public methodDispose (Inherited from Primitive.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSet(IEnumerableCartesian, IEnumerableString)
Defines the positions and text of strings in a text batch. The strings are rendered in the primitive's ReferenceFrame.
Public methodSet(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.
Public methodSet(IEnumerableCartesian, IEnumerableString, TextBatchPrimitiveOptionalParameters, RenderPassHint)
Defines the positions, text, and optional parameters of strings in a text batch. The strings are rendered in the primitive's ReferenceFrame. renderPassHint is provided for efficiency.
Public methodSetCartographic(CentralBody, IEnumerableCartographic, IEnumerableString)
Public methodSetCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, TextBatchPrimitiveOptionalParameters)
For convenience. Defines the positions, text, and optional parameters of strings in a text batch using Cartographic positions. Longitude and latitude are in radians, and altitude is in meters. This is equivalent to converting each position in positions to Cartesian and calling Set(IEnumerableCartesian, IEnumerableString).
Public methodSetCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, TextBatchPrimitiveOptionalParameters, RenderPassHint)
For convenience. Defines the positions, text, and optional parameters of strings in a text batch using Cartographic positions. Longitude and latitude are in radians, and altitude is in meters. This is equivalent to converting each position in positions to Cartesian and calling Set(IEnumerableCartesian, IEnumerableString).
Public methodSetPartial(IEnumerableCartesian, IEnumerableString, IEnumerableInt32)
Updates a subset of positions and/or text in a text batch.
Public methodSetPartial(IEnumerableCartesian, IEnumerableString, TextBatchPrimitiveOptionalParameters, IEnumerableInt32)
Updates a subset of positions, text, and/or optional per-string parameters in a text batch.
Public methodSetPartial(IEnumerableCartesian, IEnumerableString, IEnumerableInt32, IndicesOrderHint)
Updates a subset of positions and/or text in a text batch.
Public methodSetPartial(IEnumerableCartesian, IEnumerableString, TextBatchPrimitiveOptionalParameters, IEnumerableInt32, IndicesOrderHint, RenderPassHint)
Updates a subset of positions, text, and/or optional per-string parameters in a text batch.
Public methodSetPartialCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, IEnumerableInt32)
Public methodSetPartialCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, TextBatchPrimitiveOptionalParameters, IEnumerableInt32)
Public methodSetPartialCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, IEnumerableInt32, IndicesOrderHint)
Public methodSetPartialCartographic(CentralBody, IEnumerableCartographic, IEnumerableString, TextBatchPrimitiveOptionalParameters, IEnumerableInt32, IndicesOrderHint, RenderPassHint)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also