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
Set | Defines the positions of points in a point batch. The points are rendered in the primitive's Reference Frame. |
SetCartographic | For 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. |
SetCartographicWithColors | For 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. |
SetCartographicWithColorsAndRenderPass | For 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. |
SetPartial | Updates a subset of positions in a point batch. |
SetPartialCartographic | For 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 |
SetPartialCartographicWithColors | For 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 |
SetPartialCartographicWithColorsIndicesOrderAndRenderPass | For 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 |
SetPartialCartographicWithIndicesOrder | For 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 |
SetPartialWithColors | Updates a subset of positions and/or colors in a point batch. |
SetPartialWithColorsIndicesOrderAndRenderPass | Updates a subset of positions and/or colors in a point batch. |
SetPartialWithIndicesOrder | Updates a subset of positions in a point batch. |
SetWithColors | Defines the positions and colors of points in a point batch. The points are rendered in the primitive's Reference Frame. |
SetWithColorsAndRenderPass | Defines 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 Properties
Interfaces
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 = 65280
point.DisplayOutline = True
point.OutlineWidth = 5
point.OutlineColor = 255
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