AGI STK Graphics 11 Send 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.

Object Model




Public Methods

Public Method AlignToAxis Sets 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 AlignToNorth Sets 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 AlignToScreen Sets the up vector of the markers to always be aligned to the up vector of the camera. This is the default alignment.
Public Method Set Defines the positions of markers in a marker batch. The markers are rendered in the primitive's Reference Frame.
Public Method SetCartographic For convenience. Defines the positions of markers in a marker 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.
Public Method SetCartographicWithOptionalParameters For convenience. Defines the positions and optional per-marker parameters of markers in a marker 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.
Public Method SetCartographicWithOptionalParametersAndRenderPassHint For convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using Cartographic positions. Longitude and latitude are in radians, and altitude is in meters. renderPassHint is provided for efficiency. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetPartial Updates a subset of marker positions in a marker batch.
Public Method SetPartialCartographic For convenience. Updates a subset of positions in a marker 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 Partial.
Public Method SetPartialCartographicWithIndicesOrder For convenience. Updates a subset of positions in a marker 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 Partial.
Public Method SetPartialCartographicWithOptionalParameters For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker 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 Partial.
Public Method SetPartialCartographicWithOptionalParametersIndicesOrderAndRenderPass For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using Cartographic positions. Longitude and latitude are in radians, and altitude is in meters. renderPassHint is provided for efficiency. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialWithIndicesOrder Updates a subset of marker positions in a marker batch.
Public Method SetPartialWithOptionalParameters Updates a subset of marker positions and/or per-marker parameters in a marker batch.
Public Method SetPartialWithOptionalParametersIndicesOrderAndRenderPass Updates a subset of marker positions and/or per-marker parameters in a marker batch.
Public Method SetWithOptionalParameters Defines 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 SetWithOptionalParametersAndRenderPassHint Defines 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 Supported Determines whether or not the video card supports the marker batch primitive with the given renderingMethod.

Public Properties

Public Property AlignToPixel Gets or sets whether the screen space position of each marker is aligned to a pixel.
Public Property BoundingSphereScale Gets or sets the scale applied to the radius of this primitive's bounding sphere.
Public Property CentralBodyClipped Gets or sets whether the markers are clipped by the central body.
Public Property ClampToPixel Gets or sets whether the screen space position of each marker is clamped to a pixel.
Public Property DistanceDisplayConditionPerMarker Gets 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 EyeOffset Gets 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 Origin Gets or sets the per-batch origin, which is applied to each marker in the batch.
Public Property PerItemPickingEnabled Gets 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 PixelOffset Gets 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 RenderingMethod Gets the rendering method used to render the marker batch.
Public Property RenderPass Gets or sets the pass during which the marker batch is rendered.
Public Property Rotation Gets or sets the per-batch rotation angle, in radians, which is applied to each marker in the batch.
Public Property SetHint Gets the primitive's Set Hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with.
Public Property Size Gets 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 SizeSource Gets the source used for the size of markers in the batch.
Public Property SizeUnit Gets or sets the unit that each marker's size is defined in.
Public Property SortOrder Gets the order in which markers in the marker batch are sorted before rendering.
Public Property Texture Gets or sets the per-batch texture, which is applied to each marker in the batch.
Public Property TextureCoordinate Gets 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 TextureFilter Gets or sets the filter used for per-marker or per-batch textures.
Public Property Wireframe Gets or sets whether the primitive is rendered in wireframe. This is useful for debugging.

Example

Draw a set of markers
[C#] Copy Code
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager; 
 
Array positions = new object[] 

    39.88, -75.250,    // Philadelphia 
    38.85, -77.040// Washington, D.C. 
    29.98, -90.250// New Orleans 
    37.37, -121.920    // 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] Copy Code
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

CoClasses that Implement IAgStkGraphicsMarkerBatchPrimitive

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1