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#

set

Define the positions of points in a point batch. The points are rendered in the primitive’s reference frame.

set_with_colors

Define the positions and colors of points in a point batch. The points are rendered in the primitive’s reference frame.

set_with_colors_and_render_pass

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.

set_cartographic

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.

set_cartographic_with_colors

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.

set_cartographic_with_colors_and_render_pass

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.

set_partial

Update a subset of positions in a point batch.

set_partial_with_indices_order

Update a subset of positions in a point batch.

set_partial_with_colors

Update a subset of positions and/or colors in a point batch.

set_partial_with_colors_indices_order_and_render_pass

Update a subset of positions and/or colors in a point batch.

set_partial_cartographic

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.

set_partial_cartographic_with_indices_order

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.

set_partial_cartographic_with_colors

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.

set_partial_cartographic_with_colors_indices_order_and_render_pass

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.

set_with_optional_parameters

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.

display_outline

Get or set whether an outline is rendered around each point in the batch.

outline_color

Get or set the outline’s color.

outline_translucency

Get or set the translucency of the outline. Translucency is between 0 and 1, where 0 is opaque and 1 is transparent.

outline_width

Get or set the size, in pixels, of the outline around each point in the batch.

pixel_size

Get or set the size, in pixels, of each point in the point batch.

minimum_pixel_size_supported

Get the minimum pixel size supported by the video card.

maximum_pixel_size_supported

Get the maximum pixel size supported by the video card.

distance_display_condition_per_point

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…

set_hint

Get the primitive’s set hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with.

per_item_picking_enabled

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.

central_body_clipped

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_color: Color#

Get or set the outline’s color.

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.

property PointBatchPrimitive.per_item_picking_enabled: bool#

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.

property PointBatchPrimitive.central_body_clipped: bool#

Get or set whether individual points will be clipped by the central body.

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.

Parameters:

positions : list

Returns:

None

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.

Parameters:

positions : list

colors : list

Returns:

None

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.

Parameters:

positions : list

colors : list

render_pass_hint : RenderPassHint

Returns:

None

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.

Parameters:

central_body : str

positions : list

Returns:

None

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.

Parameters:

central_body : str

positions : list

colors : list

Returns:

None

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.

Parameters:

central_body : str

positions : list

colors : list

render_pass_hint : RenderPassHint

Returns:

None

PointBatchPrimitive.set_partial(self, positions: list, indices: list) None#

Update a subset of positions in a point batch.

Parameters:

positions : list

indices : list

Returns:

None

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.

Parameters:

positions : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

Returns:

None

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.

Parameters:

positions : list

colors : list

indices : list

Returns:

None

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.

Parameters:

positions : list

colors : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

render_pass_hint : RenderPassHint

Returns:

None

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.

Parameters:

central_body : str

positions : list

indices : list

Returns:

None

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.

Parameters:

central_body : str

positions : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

Returns:

None

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.

Parameters:

central_body : str

positions : list

colors : list

indices : list

Returns:

None

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.

Parameters:

central_body : str

positions : list

colors : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

render_pass_hint : RenderPassHint

Returns:

None

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.

Parameters:

positions : list

colors : list

optional_parameters : PointBatchPrimitiveOptionalParameters

render_pass_hint : RenderPassHint

Returns:

None