STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsMarkerBatchPrimitive Interface

Description

Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards.

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

Public Methods

Public Method AlignToAxisSets the up vector of the markers to point towards the axis of centralBody. It will be aligned with the tangent vector of the surface that points towards the axis. Setting axis to the north axis of the centralBody will have the same effect as calling MarkerBatchPrimitive.AlignToNorth.
Public Method AlignToNorthSets the up vector of the markers to point towards the north axis of centralBody. It will be aligned with the tangent vector of the surface that points north.
Public Method AlignToScreenSets the up vector of the markers to always be aligned to the up vector of the camera. This is the default alignment.
Public Method SetDefines the positions of markers in a marker batch. The markers are rendered in the primitive's Reference Frame.
Public Method SetCartographicFor convenience. Defines the positions of markers in a marker batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetCartographicWithOptionalParametersFor convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetCartographicWithOptionalParametersAndRenderPassHintFor convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using Cartographic positions. renderPassHint is provided for efficiency. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetPartialUpdates a subset of marker positions in a marker batch.
Public Method SetPartialCartographicFor convenience. Updates a subset of positions in a marker batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialCartographicWithIndicesOrderFor convenience. Updates a subset of positions in a marker batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialCartographicWithOptionalParametersFor convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialCartographicWithOptionalParametersIndicesOrderAndRenderPassFor convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using Cartographic positions. renderPassHint is provided for efficiency. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialWithIndicesOrderUpdates a subset of marker positions in a marker batch.
Public Method SetPartialWithOptionalParametersUpdates a subset of marker positions and/or per-marker parameters in a marker batch.
Public Method SetPartialWithOptionalParametersIndicesOrderAndRenderPassUpdates a subset of marker positions and/or per-marker parameters in a marker batch.
Public Method SetWithOptionalParametersDefines the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive's Reference Frame.
Public Method SetWithOptionalParametersAndRenderPassHintDefines the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive's Reference Frame. renderPassHint is provided for efficiency.
Public Method SupportedDetermines whether or not the video card supports the marker batch primitive with the given renderingMethod.

Public Properties

Public Property BoundingSphereScaleGets or sets the scale applied to the radius of this primitive's bounding sphere.
Public Property CentralBodyClippedGets or sets whether the markers are clipped by the central body.
Public Property ClampToPixelGets or sets whether the screen space position of each marker is clamped to a pixel.
Public Property DistanceDisplayConditionPerMarkerGets or sets a Distance Display Condition that is evaluated per marker in the marker batch during rendering. This is different than Display Condition, which is evaluated once for the entire marker batch. When DistanceDisplayConditionPerMarker is null, no per marker display condition is evaluated.
Public Property EyeOffsetGets or sets the per-batch eye offset, which is applied to each marker in the batch. The array contains the components of the eye offset in the order x, y, z.
Public Property OriginGets or sets the per-batch origin, which is applied to each marker in the batch.
Public Property PerItemPickingEnabledGets or sets whether individual marker indices will be included in the PickResults returned from the Scene's Pick method. Each marker index that is picked will be returned as a BatchPrimitiveIndex.
Public Property PixelOffsetGets or sets the per-batch pixel offset, which is applied to each marker in the batch. The array contains one x pixel offset followed by one y pixel offset.
Public Property RenderingMethodGets the rendering method used to render the marker batch.
Public Property RenderPassGets or sets the pass during which the marker batch is rendered.
Public Property RotationGets or sets the per-batch rotation angle which is applied to each marker in the batch.
Public Property SetHintGets the primitive's Set Hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with.
Public Property SizeGets or sets the per-batch size, which is applied to each marker in the batch. The array contains one width followed by one height.
Public Property SizeSourceGets the source used for the size of markers in the batch.
Public Property SizeUnitGets or sets the unit that each marker's size is defined in.
Public Property SortOrderGets the order in which markers in the marker batch are sorted before rendering.
Public Property TextureGets or sets the per-batch texture, which is applied to each marker in the batch.
Public Property TextureCoordinateGets or sets the per-batch texture coordinate, which is applied to each marker in the batch. The array contains the texture coordinates arranged in the order s, t, p, q.
Public Property TextureFilterGets or sets the filter used for per-marker or per-batch textures.
Public Property WireframeGets or sets whether the primitive is rendered in wireframe. This is useful for debugging.

Interfaces

Implemented Interface
IAgStkGraphicsPrimitive

CoClasses that Implement IAgStkGraphicsMarkerBatchPrimitive

Example

Draw a set of markers
[C#]
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager;

Array positions = new object[]
{
    39.88, -75.25, 0,    // Philadelphia
    38.85, -77.04, 0, // Washington, D.C.   
    29.98, -90.25, 0, // New Orleans
    37.37, -121.92, 0    // San Jose
};

IAgStkGraphicsMarkerBatchPrimitive markerBatch = manager.Initializers.MarkerBatchPrimitive.Initialize();
markerBatch.Texture = manager.Textures.LoadFromStringUri(
    markerImageFile);
markerBatch.SetCartographic("Earth", ref positions);

manager.Primitives.Add((IAgStkGraphicsPrimitive)markerBatch);
Draw a set of markers
[Visual Basic .NET]
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager

Dim positions As Array = New Object() { _
    39.88, -75.25, 0, _
     38.85, -77.04, 0, _
     29.98, -90.25, 0, _
     37.37, -121.92, 0}

Dim markerBatch As IAgStkGraphicsMarkerBatchPrimitive = manager.Initializers.MarkerBatchPrimitive.Initialize()
markerBatch.Texture = manager.Textures.LoadFromStringUri( _
    markerImageFile)
markerBatch.SetCartographic("Earth", positions)

manager.Primitives.Add(DirectCast(markerBatch, IAgStkGraphicsPrimitive))

See Also

© 2024 Analytical Graphics, Inc. All Rights Reserved.