STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsPointBatchPrimitive Interface

Description

Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each. See the Batching Performance Overview.

Public Methods

Public Method SetDefines the positions of points in a point batch. The points are rendered in the primitive's Reference Frame.
Public Method SetCartographicFor convenience. Defines the positions of points in a point batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetCartographicWithColorsFor convenience. Defines the positions and colors of points in a point batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set.
Public Method SetCartographicWithColorsAndRenderPassFor convenience. Defines the positions and colors of points in a point 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 positions in a point batch.
Public Method SetPartialCartographicFor convenience. Updates a subset of positions in a point batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialCartographicWithColorsFor convenience. Updates a subset of positions and/or colors in a point batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialCartographicWithColorsIndicesOrderAndRenderPassFor convenience. Updates a subset of positions and/or colors in a point 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 point batch using Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Set Partial.
Public Method SetPartialWithColorsUpdates a subset of positions and/or colors in a point batch.
Public Method SetPartialWithColorsIndicesOrderAndRenderPassUpdates a subset of positions and/or colors in a point batch.
Public Method SetPartialWithIndicesOrderUpdates a subset of positions in a point batch.
Public Method SetWithColorsDefines the positions and colors of points in a point batch. The points are rendered in the primitive's Reference Frame.
Public Method SetWithColorsAndRenderPassDefines the positions and colors of points in a point batch. The points are rendered in the primitive's Reference Frame. renderPassHint is provided for efficiency.
Public Method SetWithOptionalParametersDefines the positions, colors, and optional parameters of points in a point batch. The points are rendered in the primitive's Reference Frame. renderPassHint is provided for efficiency.

Public Properties

Public Property CentralBodyClippedGets or sets whether individual points will be clipped by the central body.
Public Property DisplayOutlineGets or sets whether an outline is rendered around each point in the batch.
Public Property DistanceDisplayConditionPerPointGets or sets a Distance Display Condition that is evaluated per point in the point batch during rendering. This is different than Display Condition, which is evaluated once for the entire point batch. When DistanceDisplayConditionPerPoint is null, no per point display condition is evaluated.
Public Property MaximumPixelSizeSupportedGets the maximum pixel size supported by the video card.
Public Property MinimumPixelSizeSupportedGets the minimum pixel size supported by the video card.
Public Property OutlineColorGets or sets the outline's color.
Public Property OutlineTranslucencyGets or sets the translucency of the outline. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.
Public Property OutlineWidthGets or sets the size, in pixels, of the outline around each point in the batch.
Public Property PerItemPickingEnabledGets or sets whether individual point indices will be included in the PickResults returned from the Scene's Pick method. Each point index that is picked will be returned as a BatchPrimitiveIndex.
Public Property PixelSizeGets or sets the size, in pixels, of each point in the point 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.

Interfaces

Implemented Interface
IAgStkGraphicsPrimitive

CoClasses that Implement IAgStkGraphicsPointBatchPrimitive

Example

Draw a set of points
[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
};

IAgStkGraphicsPointBatchPrimitive pointBatch = manager.Initializers.PointBatchPrimitive.Initialize();
pointBatch.SetCartographic("Earth", ref positions);
pointBatch.PixelSize = 5;
((IAgStkGraphicsPrimitive)pointBatch).Color = Color.White;
pointBatch.DisplayOutline = true;
pointBatch.OutlineWidth = 2;
pointBatch.OutlineColor = Color.Red;

manager.Primitives.Add((IAgStkGraphicsPrimitive)pointBatch);
Draw a set of uniquely colored points
[C#]
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager;
Array positions = new object[]
{
    37.62, -122.38, 0.0,    // San Francisco
    38.52, -121.50, 0.0,    // Sacramento
    33.93, -118.40, 0.0,    // Los Angeles
    32.82, -117.13, 0.0     // San Diego
};

Array colors = new object[]
{
    (uint)Color.Red.ToArgb(),
    (uint)Color.Orange.ToArgb(),
    (uint)Color.Blue.ToArgb(),
    (uint)Color.White.ToArgb()
};

IAgStkGraphicsPointBatchPrimitive pointBatch = manager.Initializers.PointBatchPrimitive.Initialize();
pointBatch.SetCartographicWithColors("Earth", ref positions, ref colors);
pointBatch.PixelSize = 8;

manager.Primitives.Add((IAgStkGraphicsPrimitive)pointBatch);
Draw a set of points
[Visual Basic .NET]
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager
' Philadelphia
' Washington, D.C.
' New Orleans
' San Jose
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 pointBatch As IAgStkGraphicsPointBatchPrimitive = manager.Initializers.PointBatchPrimitive.Initialize()
pointBatch.SetCartographic("Earth", positions)
pointBatch.PixelSize = 5
DirectCast(pointBatch, IAgStkGraphicsPrimitive).Color = Color.White
pointBatch.DisplayOutline = True
pointBatch.OutlineWidth = 2
pointBatch.OutlineColor = Color.Red

manager.Primitives.Add(DirectCast(pointBatch, IAgStkGraphicsPrimitive))
Draw a set of uniquely colored points
[Visual Basic .NET]
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager
' San Francisco, Sacramento, Los Angeles, San Diego
Dim positions As Array = New Object() _
{ _
    37.62, -122.38, 0.0, _
    38.52, -121.5, 0.0, _
    33.93, -118.4, 0.0, _
    32.82, -117.13, 0.0 _
}

Dim colors As Array = New Object() _
{ _
    Color.Red.ToArgb(), _
     Color.Orange.ToArgb(), _
     Color.Blue.ToArgb(), _
     Color.White.ToArgb() _
}

Dim pointBatch As IAgStkGraphicsPointBatchPrimitive = manager.Initializers.PointBatchPrimitive.Initialize()
pointBatch.SetCartographicWithColors("Earth", positions, colors)
pointBatch.PixelSize = 8

manager.Primitives.Add(DirectCast(pointBatch, IAgStkGraphicsPrimitive))
Draw a Point Primitive and set properties
[Python - STK API]
# IAgScenario scenario: Scenario object
manager = scenario.SceneManager
point = manager.Initializers.PointBatchPrimitive.Initialize()
ptPosition = [[0], [-1], [0]]  # Lat, Lon, Alt

point.SetCartographic('Earth', ptPosition)
point.PixelSize = 15
point.Color = Colors.Lime
point.DisplayOutline = True
point.OutlineWidth = 5
point.OutlineColor = Colors.Red

manager.Primitives.Add(point)
# Render the Scene
manager.Render()

Draw a Point Primitive and set properties
[MATLAB]
% IAgScenario scenario: Scenario object
manager = scenario.SceneManager;
point = manager.Initializers.PointBatchPrimitive.Initialize();
ptPosition = {0;-1;0};  % Lat, Lon, Alt

point.SetCartographic('Earth', ptPosition)
point.PixelSize = 15;
point.Color = 65280;
point.DisplayOutline = true;
point.OutlineWidth = 5;
point.OutlineColor = 255;

manager.Primitives.Add(point);
% Render the Scene
manager.Render();


        

See Also

© 2024 Analytical Graphics, Inc. All Rights Reserved.