MarkerBatchPrimitive#

class ansys.stk.core.graphics.MarkerBatchPrimitive#

Bases: IPrimitive

Render one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards…

Overview#

set

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

set_with_optional_parameters

Define the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive’s reference frame.

set_with_optional_parameters_and_render_pass_hint

Define the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive’s reference frame. renderPassHint is provided for efficiency.

set_cartographic

For convenience. Defines the positions of markers in a marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling Set.

set_cartographic_with_optional_parameters

For convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling Set.

set_cartographic_with_optional_parameters_and_render_pass_hint

For convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using cartographic positions. renderPassHint is provided for efficiency…

set_partial

Update a subset of marker positions in a marker batch.

set_partial_with_indices_order

Update a subset of marker positions in a marker batch.

set_partial_with_optional_parameters

Update a subset of marker positions and/or per-marker parameters in a marker batch.

set_partial_with_optional_parameters_indices_order_and_render_pass

Update a subset of marker positions and/or per-marker parameters in a marker batch.

set_partial_cartographic

For convenience. Updates a subset of positions in a marker 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 marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling SetPartial.

set_partial_cartographic_with_optional_parameters

For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling SetPartial.

set_partial_cartographic_with_optional_parameters_indices_order_and_render_pass

For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using cartographic positions. renderPassHint is provided for efficiency…

supported

Determine whether or not the video card supports the marker batch primitive with the given renderingMethod.

align_to_screen

Set the up vector of the markers to always be aligned to the up vector of the camera. This is the default alignment.

align_to_north

Set the up vector of the markers to point towards the north axis of centralBody. It will be aligned with the tangent vector of the surface that points north.

align_to_axis

Set the up vector of the markers to point towards the axis of centralBody. It will be aligned with the tangent vector of the surface that points towards the axis…

size_source

Get the source used for the size of markers in the batch.

sort_order

Get the order in which markers in the marker batch are sorted before rendering.

set_hint

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

rendering_method

Get the rendering method used to render the marker batch.

render_pass

Get or set the pass during which the marker batch is rendered.

bounding_sphere_scale

Get or set the scale applied to the radius of this primitive’s bounding sphere.

distance_display_condition_per_marker

Get or set a distance display condition that is evaluated per marker in the marker batch during rendering. This is different than display condition, which is evaluated once for the entire marker batch…

texture

Get or set the per-batch texture, which is applied to each marker in the batch.

size_unit

Get or set the unit that each marker’s size is defined in.

size

Get or set the per-batch size, which is applied to each marker in the batch. The array contains one width followed by one height.

origin

Get or set the per-batch origin, which is applied to each marker in the batch.

pixel_offset

Get or set the per-batch pixel offset, which is applied to each marker in the batch. The array contains one x pixel offset followed by one y pixel offset.

eye_offset

Get or set the per-batch eye offset, which is applied to each marker in the batch. The array contains the components of the eye offset in the order x, y, z.

rotation

Get or set the per-batch rotation angle which is applied to each marker in the batch.

texture_coordinate

Get or set the per-batch texture coordinate, which is applied to each marker in the batch. The array contains the texture coordinates arranged in the order s, t, p, q.

wireframe

Get or set whether the primitive is rendered in wireframe. This is useful for debugging.

per_item_picking_enabled

Get or set whether individual marker indices will be included in the pick results returned from the scene’s Pick method. Each marker index that is picked will be returned as a batch primitive index.

texture_filter

Get or set the filter used for per-marker or per-batch textures.

clamp_to_pixel

Get or set whether the screen space position of each marker is clamped to a pixel.

central_body_clipped

Get or set whether the markers are clipped by the central body.

Import detail#

from ansys.stk.core.graphics import MarkerBatchPrimitive

Property detail#

property MarkerBatchPrimitive.size_source: MarkerBatchSizeSource#

Get the source used for the size of markers in the batch.

property MarkerBatchPrimitive.sort_order: MarkerBatchSortOrder#

Get the order in which markers in the marker batch are sorted before rendering.

property MarkerBatchPrimitive.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 MarkerBatchPrimitive.rendering_method: MarkerBatchRenderingMethod#

Get the rendering method used to render the marker batch.

property MarkerBatchPrimitive.render_pass: MarkerBatchRenderPass#

Get or set the pass during which the marker batch is rendered.

property MarkerBatchPrimitive.bounding_sphere_scale: float#

Get or set the scale applied to the radius of this primitive’s bounding sphere.

property MarkerBatchPrimitive.distance_display_condition_per_marker: DistanceDisplayCondition#

Get or set a distance display condition that is evaluated per marker in the marker batch during rendering. This is different than display condition, which is evaluated once for the entire marker batch…

property MarkerBatchPrimitive.texture: RendererTexture2D#

Get or set the per-batch texture, which is applied to each marker in the batch.

property MarkerBatchPrimitive.size_unit: MarkerBatchSizeUnit#

Get or set the unit that each marker’s size is defined in.

property MarkerBatchPrimitive.size: list#

Get or set the per-batch size, which is applied to each marker in the batch. The array contains one width followed by one height.

property MarkerBatchPrimitive.origin: Origin#

Get or set the per-batch origin, which is applied to each marker in the batch.

property MarkerBatchPrimitive.pixel_offset: list#

Get or set the per-batch pixel offset, which is applied to each marker in the batch. The array contains one x pixel offset followed by one y pixel offset.

property MarkerBatchPrimitive.eye_offset: list#

Get or set the per-batch eye offset, which is applied to each marker in the batch. The array contains the components of the eye offset in the order x, y, z.

property MarkerBatchPrimitive.rotation: float#

Get or set the per-batch rotation angle which is applied to each marker in the batch.

property MarkerBatchPrimitive.texture_coordinate: list#

Get or set the per-batch texture coordinate, which is applied to each marker in the batch. The array contains the texture coordinates arranged in the order s, t, p, q.

property MarkerBatchPrimitive.wireframe: bool#

Get or set whether the primitive is rendered in wireframe. This is useful for debugging.

property MarkerBatchPrimitive.per_item_picking_enabled: bool#

Get or set whether individual marker indices will be included in the pick results returned from the scene’s Pick method. Each marker index that is picked will be returned as a batch primitive index.

property MarkerBatchPrimitive.texture_filter: TextureFilter2D#

Get or set the filter used for per-marker or per-batch textures.

property MarkerBatchPrimitive.clamp_to_pixel: bool#

Get or set whether the screen space position of each marker is clamped to a pixel.

property MarkerBatchPrimitive.central_body_clipped: bool#

Get or set whether the markers are clipped by the central body.

Method detail#

MarkerBatchPrimitive.set(self, positions: list) None#

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

Parameters:

positions : list

Returns:

None

MarkerBatchPrimitive.set_with_optional_parameters(self, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters) None#

Define the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive’s reference frame.

Parameters:

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

Returns:

None

MarkerBatchPrimitive.set_with_optional_parameters_and_render_pass_hint(self, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, render_pass_hint: RenderPassHint) None#

Define the positions and optional per-marker parameters of markers in a marker batch. The markers are rendered in the primitive’s reference frame. renderPassHint is provided for efficiency.

Parameters:

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

render_pass_hint : RenderPassHint

Returns:

None

MarkerBatchPrimitive.set_cartographic(self, central_body: str, positions: list) None#

For convenience. Defines the positions of markers in a marker 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

MarkerBatchPrimitive.set_cartographic_with_optional_parameters(self, central_body: str, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters) None#

For convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling Set.

Parameters:

central_body : str

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

Returns:

None

MarkerBatchPrimitive.set_cartographic_with_optional_parameters_and_render_pass_hint(self, central_body: str, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, render_pass_hint: RenderPassHint) None#

For convenience. Defines the positions and optional per-marker parameters of markers in a marker batch using cartographic positions. renderPassHint is provided for efficiency…

Parameters:

central_body : str

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

render_pass_hint : RenderPassHint

Returns:

None

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

Update a subset of marker positions in a marker batch.

Parameters:

positions : list

indices : list

Returns:

None

MarkerBatchPrimitive.set_partial_with_indices_order(self, positions: list, indices: list, indices_order_hint: PrimitiveIndicesOrderHint) None#

Update a subset of marker positions in a marker batch.

Parameters:

positions : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

Returns:

None

MarkerBatchPrimitive.set_partial_with_optional_parameters(self, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, indices: list) None#

Update a subset of marker positions and/or per-marker parameters in a marker batch.

Parameters:

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

indices : list

Returns:

None

MarkerBatchPrimitive.set_partial_with_optional_parameters_indices_order_and_render_pass(self, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, indices: list, indices_order_hint: PrimitiveIndicesOrderHint, render_pass_hint: RenderPassHint) None#

Update a subset of marker positions and/or per-marker parameters in a marker batch.

Parameters:

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

render_pass_hint : RenderPassHint

Returns:

None

MarkerBatchPrimitive.set_partial_cartographic(self, central_body: str, positions: list, indices: list) None#

For convenience. Updates a subset of positions in a marker 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

MarkerBatchPrimitive.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 marker 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

MarkerBatchPrimitive.set_partial_cartographic_with_optional_parameters(self, central_body: str, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, indices: list) None#

For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling SetPartial.

Parameters:

central_body : str

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

indices : list

Returns:

None

MarkerBatchPrimitive.set_partial_cartographic_with_optional_parameters_indices_order_and_render_pass(self, central_body: str, positions: list, optional_parameters: MarkerBatchPrimitiveOptionalParameters, indices: list, indices_order_hint: PrimitiveIndicesOrderHint, render_pass_hint: RenderPassHint) None#

For convenience. Updates a subset of positions and/or optional per-marker parameters of markers in a marker batch using cartographic positions. renderPassHint is provided for efficiency…

Parameters:

central_body : str

positions : list

optional_parameters : MarkerBatchPrimitiveOptionalParameters

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

render_pass_hint : RenderPassHint

Returns:

None

MarkerBatchPrimitive.supported(self, rendering_method: MarkerBatchRenderingMethod) bool#

Determine whether or not the video card supports the marker batch primitive with the given renderingMethod.

Parameters:

rendering_method : MarkerBatchRenderingMethod

Returns:

bool

MarkerBatchPrimitive.align_to_screen(self) None#

Set the up vector of the markers to always be aligned to the up vector of the camera. This is the default alignment.

Returns:

None

MarkerBatchPrimitive.align_to_north(self, central_body: str) None#

Set the up vector of the markers to point towards the north axis of centralBody. It will be aligned with the tangent vector of the surface that points north.

Parameters:

central_body : str

Returns:

None

MarkerBatchPrimitive.align_to_axis(self, central_body: str, axis: list) None#

Set the up vector of the markers to point towards the axis of centralBody. It will be aligned with the tangent vector of the surface that points towards the axis…

Parameters:

central_body : str

axis : list

Returns:

None