PolylinePrimitive#

class ansys.stk.core.graphics.PolylinePrimitive#

Bases: IPrimitive

Render a polyline in the 3D scene. Each line segment may have a different color. A polyline can be constructed with a position interpolator to render great arcs or rhumb lines.

Overview#

set

Define the positions for a polyline primitive. The polyline is rendered in its reference frame.

set_with_colors

Define the positions and colors of a polyline. The polyline is rendered in its reference frame.

set_with_colors_and_hint

Define the positions and colors of a polyline. The polyline is rendered in its reference frame. renderPassHint is provided for efficiency.

set_with_surface_shapes_result

Define the positions of a polyline using the positions of the specified surfaceShapesResult.

set_with_surface_triangulator_result

Define the positions of a polyline using the boundary positions of the specified surfaceTriangulatorResult.

set_with_solid_triangulator_result

Define the positions of a polyline using the outline positions of the specified solidTriangulatorResult.

set_cartographic

For convenience. Defines the positions of a polyline 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 a polyline using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling Set.

set_cartographic_with_colors_and_hint

For convenience. Defines the positions and colors of a polyline using cartographic positions. renderPassHint is provided for efficiency. This is equivalent to converting each position in positions to cartesian and calling Set.

set_subset

Define the positions of a polyline using a subset of input positions.

set_subset_cartographic

For convenience. Defines the positions of a polyline using a subset of input cartographic positions. This is equivalent to converting the subset of positions to cartesian and calling SetSubset.

set_partial

Update a subset of positions in a polyline.

set_partial_with_indices_order

Update a subset of positions in a polyline.

set_partial_with_colors

Update a subset of positions and/or colors in a polyline.

set_partial_with_colors_indices_order_and_render_pass_hint

Update a subset of positions and/or colors in a polyline.

set_partial_cartographic

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

set_with_colors_and_optional_parameters

Define the positions, colors, and/or optional point properties of a polyline. The polyline is rendered in its reference frame.

set_cartographic_with_colors_and_optional_parameters

For convenience. Defines the positions, colors, and/or optional point properties of a polyline using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling Set.

set_partial_with_colors_and_optional_parameters

Update a subset of positions, colors, and/or optional point properties in a polyline.

set_partial_cartographic_with_optional_parameters

For convenience. Updates a subset of positions, colors, and/or optional point properties in a polyline using cartographic positions. This is equivalent to converting each position in positions to cartesian and calling SetPartial.

width

Get or set the line width, in pixels.

minimum_width_supported

Get the minimum width, in pixels, supported by the video card.

maximum_width_supported

Get the maximum width, in pixels, supported by the video card.

position_interpolator

Get the position interpolator applied to positions passed to Set, SetCartographic, SetSubset, and SetSubsetCartographic methods. When this property is null, linear interpolation is used.

polyline_type

Get how the polyline interprets the positions passed to Set methods.

set_hint

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

display_outline

Get or set whether an outline is rendered around the polyline.

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 width, in pixels, of the outline around the polyline.

per_item_picking_enabled

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

central_body_clipped

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

Import detail#

from ansys.stk.core.graphics import PolylinePrimitive

Property detail#

property PolylinePrimitive.width: float#

Get or set the line width, in pixels.

property PolylinePrimitive.minimum_width_supported: float#

Get the minimum width, in pixels, supported by the video card.

property PolylinePrimitive.maximum_width_supported: float#

Get the maximum width, in pixels, supported by the video card.

property PolylinePrimitive.position_interpolator: IPositionInterpolator#

Get the position interpolator applied to positions passed to Set, SetCartographic, SetSubset, and SetSubsetCartographic methods. When this property is null, linear interpolation is used.

property PolylinePrimitive.polyline_type: PolylineType#

Get how the polyline interprets the positions passed to Set methods.

property PolylinePrimitive.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 PolylinePrimitive.display_outline: bool#

Get or set whether an outline is rendered around the polyline.

property PolylinePrimitive.outline_color: Color#

Get or set the outline’s color.

property PolylinePrimitive.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 PolylinePrimitive.outline_width: float#

Get or set the width, in pixels, of the outline around the polyline.

property PolylinePrimitive.per_item_picking_enabled: bool#

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

property PolylinePrimitive.central_body_clipped: bool#

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

Method detail#

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

Define the positions for a polyline primitive. The polyline is rendered in its reference frame.

Parameters:

positions : list

Returns:

None

PolylinePrimitive.set_with_colors(self, positions: list, colors: list) None#

Define the positions and colors of a polyline. The polyline is rendered in its reference frame.

Parameters:

positions : list

colors : list

Returns:

None

PolylinePrimitive.set_with_colors_and_hint(self, positions: list, colors: list, render_pass_hint: RenderPassHint) None#

Define the positions and colors of a polyline. The polyline is rendered in its reference frame. renderPassHint is provided for efficiency.

Parameters:

positions : list

colors : list

render_pass_hint : RenderPassHint

Returns:

None

PolylinePrimitive.set_with_surface_shapes_result(self, surface_shapes_result: SurfaceShapesResult) None#

Define the positions of a polyline using the positions of the specified surfaceShapesResult.

Parameters:

surface_shapes_result : SurfaceShapesResult

Returns:

None

PolylinePrimitive.set_with_surface_triangulator_result(self, surface_triangulator_result: SurfaceTriangulatorResult) None#

Define the positions of a polyline using the boundary positions of the specified surfaceTriangulatorResult.

Parameters:

surface_triangulator_result : SurfaceTriangulatorResult

Returns:

None

PolylinePrimitive.set_with_solid_triangulator_result(self, solid_triangulator_result: SolidTriangulatorResult) None#

Define the positions of a polyline using the outline positions of the specified solidTriangulatorResult.

Parameters:

solid_triangulator_result : SolidTriangulatorResult

Returns:

None

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

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

PolylinePrimitive.set_cartographic_with_colors(self, central_body: str, positions: list, colors: list) None#

For convenience. Defines the positions and colors of a polyline 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

PolylinePrimitive.set_cartographic_with_colors_and_hint(self, central_body: str, positions: list, colors: list, render_pass_hint: RenderPassHint) None#

For convenience. Defines the positions and colors of a polyline 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

PolylinePrimitive.set_subset(self, positions: list, index: int, count: int) None#

Define the positions of a polyline using a subset of input positions.

Parameters:

positions : list

index : int

count : int

Returns:

None

PolylinePrimitive.set_subset_cartographic(self, central_body: str, positions: list, index: int, count: int) None#

For convenience. Defines the positions of a polyline using a subset of input cartographic positions. This is equivalent to converting the subset of positions to cartesian and calling SetSubset.

Parameters:

central_body : str

positions : list

index : int

count : int

Returns:

None

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

Update a subset of positions in a polyline.

Parameters:

positions : list

indices : list

Returns:

None

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

Update a subset of positions in a polyline.

Parameters:

positions : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

Returns:

None

PolylinePrimitive.set_partial_with_colors(self, positions: list, colors: list, indices: list) None#

Update a subset of positions and/or colors in a polyline.

Parameters:

positions : list

colors : list

indices : list

Returns:

None

PolylinePrimitive.set_partial_with_colors_indices_order_and_render_pass_hint(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 polyline.

Parameters:

positions : list

colors : list

indices : list

indices_order_hint : PrimitiveIndicesOrderHint

render_pass_hint : RenderPassHint

Returns:

None

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

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

PolylinePrimitive.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 polyline 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

PolylinePrimitive.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 polyline 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

PolylinePrimitive.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 polyline 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

PolylinePrimitive.set_with_colors_and_optional_parameters(self, positions: list, colors: list, optional_parameters: PolylinePrimitiveOptionalParameters) None#

Define the positions, colors, and/or optional point properties of a polyline. The polyline is rendered in its reference frame.

Parameters:

positions : list

colors : list

optional_parameters : PolylinePrimitiveOptionalParameters

Returns:

None

PolylinePrimitive.set_cartographic_with_colors_and_optional_parameters(self, central_body: str, positions: list, colors: list, optional_parameters: PolylinePrimitiveOptionalParameters) None#

For convenience. Defines the positions, colors, and/or optional point properties of a polyline 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

optional_parameters : PolylinePrimitiveOptionalParameters

Returns:

None

PolylinePrimitive.set_partial_with_colors_and_optional_parameters(self, positions: list, colors: list, optional_parameters: PolylinePrimitiveOptionalParameters, indices: list) None#

Update a subset of positions, colors, and/or optional point properties in a polyline.

Parameters:

positions : list

colors : list

optional_parameters : PolylinePrimitiveOptionalParameters

indices : list

Returns:

None

PolylinePrimitive.set_partial_cartographic_with_optional_parameters(self, central_body: str, positions: list, colors: list, optional_parameters: PolylinePrimitiveOptionalParameters, indices: list) None#

For convenience. Updates a subset of positions, colors, and/or optional point properties in a polyline 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

optional_parameters : PolylinePrimitiveOptionalParameters

indices : list

Returns:

None