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

Object Model


Public Methods

Public Method Set Defines the positions of points in a point batch. The points are rendered in the primitive's Reference Frame.
Public Method SetCartographic For convenience. Defines the positions of points in a point 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 SetCartographicWithColors For convenience. Defines the positions and colors of points in a point 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 SetCartographicWithColorsAndRenderPass For convenience. Defines the positions and colors of points in a point 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 positions in a point batch.
Public Method SetPartialCartographic For convenience. Updates a subset of positions in a point 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 SetPartialCartographicWithColors For convenience. Updates a subset of positions and/or colors in a point 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 SetPartialCartographicWithColorsIndicesOrderAndRenderPass For convenience. Updates a subset of positions and/or colors in a point 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 point 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 SetPartialWithColors Updates a subset of positions and/or colors in a point batch.
Public Method SetPartialWithColorsIndicesOrderAndRenderPass Updates a subset of positions and/or colors in a point batch.
Public Method SetPartialWithIndicesOrder Updates a subset of positions in a point batch.
Public Method SetWithColors Defines the positions and colors of points in a point batch. The points are rendered in the primitive's Reference Frame.
Public Method 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

Public Property CentralBodyClipped Gets or sets whether individual points will be clipped by the central body.
Public Property DisplayOutline Gets or sets whether an outline is rendered around each point in the batch.
Public Property DistanceDisplayConditionPerPoint Gets 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 MaximumPixelSizeSupported Gets the maximum pixel size supported by the video card.
Public Property MinimumPixelSizeSupported Gets the minimum pixel size supported by the video card.
Public Property OutlineColor Gets or sets the outline's color.
Public Property OutlineTranslucency Gets or sets the translucency of the outline. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.
Public Property OutlineWidth Gets or sets the size, in pixels, of the outline around each point in the batch.
Public Property PerItemPickingEnabled Gets 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 PixelSize Gets or sets the size, in pixels, of each point in the point 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.

Example

Draw a set of points
[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 
}; 
 
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#] Copy Code
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager; 
Array positions = new object[] 

    37.62, -122.380.0,    // San Francisco 
    38.52, -121.500.0,    // Sacramento 
    33.93, -118.400.0,    // Los Angeles 
    32.82, -117.130.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] Copy Code
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] Copy Code
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
[MATLAB] Copy Code
% 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

CoClasses that Implement IAgStkGraphicsPointBatchPrimitive

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1