PointBatchPrimitive#
- class ansys.stk.core.graphics.PointBatchPrimitive#
Bases:
IPrimitive
Render 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…
Overview#
Define the positions of points in a point batch. The points are rendered in the primitive’s reference frame. |
|
Define the positions and colors of points in a point batch. The points are rendered in the primitive’s reference frame. |
|
Define 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. |
|
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. |
|
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. |
|
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. |
|
Update a subset of positions in a point batch. |
|
Update a subset of positions in a point batch. |
|
Update a subset of positions and/or colors in a point batch. |
|
Update a subset of positions and/or colors in a point batch. |
|
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 SetPartial. |
|
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 SetPartial. |
|
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 SetPartial. |
|
|
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 SetPartial. |
Define 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. |
Get or set whether an outline is rendered around each point in the batch. |
|
Get or set the outline’s color. |
|
Get or set the translucency of the outline. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent. |
|
Get or set the size, in pixels, of the outline around each point in the batch. |
|
Get or set the size, in pixels, of each point in the point batch. |
|
Get the minimum pixel size supported by the video card. |
|
Get the maximum pixel size supported by the video card. |
|
Get or set 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… |
|
Get the primitive’s set hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with. |
|
Get or set whether individual point indices will be included in the pick results returned from the scene’s Pick method. Each point index that is picked will be returned as a batch primitive index. |
|
Get or set whether individual points will be clipped by the central body. |
Examples#
Draw a Point Primitive and set properties
# Scenario scenario: Scenario object
manager = scenario.scene_manager
point = manager.initializers.point_batch_primitive.initialize()
ptPosition = [[0], [-1], [0]] # Lat, Lon, Alt
point.set_cartographic("Earth", ptPosition)
point.pixel_size = 15
point.color = Colors.Lime
point.display_outline = True
point.outline_width = 5
point.outline_color = Colors.Red
manager.primitives.add(point)
# Render the Scene
manager.render()
Import detail#
from ansys.stk.core.graphics import PointBatchPrimitive
Property detail#
- property PointBatchPrimitive.display_outline: bool#
Get or set whether an outline is rendered around each point in the batch.
- property PointBatchPrimitive.outline_translucency: float#
Get or set the translucency of the outline. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.
- property PointBatchPrimitive.outline_width: float#
Get or set the size, in pixels, of the outline around each point in the batch.
- property PointBatchPrimitive.pixel_size: float#
Get or set the size, in pixels, of each point in the point batch.
- property PointBatchPrimitive.minimum_pixel_size_supported: float#
Get the minimum pixel size supported by the video card.
- property PointBatchPrimitive.maximum_pixel_size_supported: float#
Get the maximum pixel size supported by the video card.
- property PointBatchPrimitive.distance_display_condition_per_point: DistanceDisplayCondition#
Get or set 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…
- property PointBatchPrimitive.set_hint: SetHint#
Get the primitive’s set hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with.
Method detail#
- PointBatchPrimitive.set(self, positions: list) None #
Define the positions of points in a point batch. The points are rendered in the primitive’s reference frame.
- PointBatchPrimitive.set_with_colors(self, positions: list, colors: list) None #
Define the positions and colors of points in a point batch. The points are rendered in the primitive’s reference frame.
- PointBatchPrimitive.set_with_colors_and_render_pass(self, positions: list, colors: list, render_pass_hint: RenderPassHint) None #
Define 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.
- PointBatchPrimitive.set_cartographic(self, central_body: str, positions: list) None #
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.
- PointBatchPrimitive.set_cartographic_with_colors(self, central_body: str, positions: list, colors: list) None #
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.
- PointBatchPrimitive.set_cartographic_with_colors_and_render_pass(self, central_body: str, positions: list, colors: list, render_pass_hint: RenderPassHint) None #
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.
- PointBatchPrimitive.set_partial(self, positions: list, indices: list) None #
Update a subset of positions in a point batch.
- PointBatchPrimitive.set_partial_with_indices_order(self, positions: list, indices: list, indices_order_hint: PrimitiveIndicesOrderHint) None #
Update a subset of positions in a point batch.
- PointBatchPrimitive.set_partial_with_colors(self, positions: list, colors: list, indices: list) None #
Update a subset of positions and/or colors in a point batch.
- PointBatchPrimitive.set_partial_with_colors_indices_order_and_render_pass(self, positions: list, colors: list, indices: list, indices_order_hint: PrimitiveIndicesOrderHint, render_pass_hint: RenderPassHint) None #
Update a subset of positions and/or colors in a point batch.
- PointBatchPrimitive.set_partial_cartographic(self, central_body: str, positions: list, indices: list) None #
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 SetPartial.
- PointBatchPrimitive.set_partial_cartographic_with_indices_order(self, central_body: str, positions: list, indices: list, indices_order_hint: PrimitiveIndicesOrderHint) None #
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 SetPartial.
- PointBatchPrimitive.set_partial_cartographic_with_colors(self, central_body: str, positions: list, colors: list, indices: list) None #
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 SetPartial.
- PointBatchPrimitive.set_partial_cartographic_with_colors_indices_order_and_render_pass(self, central_body: str, positions: list, colors: list, indices: list, indices_order_hint: PrimitiveIndicesOrderHint, render_pass_hint: RenderPassHint) None #
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 SetPartial.
- PointBatchPrimitive.set_with_optional_parameters(self, positions: list, colors: list, optional_parameters: PointBatchPrimitiveOptionalParameters, render_pass_hint: RenderPassHint) None #
Define 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.