PathPrimitive#

class ansys.stk.core.graphics.PathPrimitive#

Bases: IPrimitive

Render a line to the 3D scene. Similar to the polyline primitive; however, the PathPrimitive was designed for the efficient addition/removal of points to/from the front or back of the line.

Overview#

item

Return the point at the given zero-based index.

add_front

Add a path point to the front of the line.

add_range_to_front

Add the range of path points to the front of the line.

add_back

Add a path point to the back of the line.

add_range_to_back

Add the range of path points to the back of the line.

remove_front

Remove a path point to the front of the line.

remove_all_before

Remove all points before index.

remove_back

Remove a path point to the back of the line.

remove_all_after

Remove all points after index.

front

Access the path point at the front of the line.

back

Access the path point at the back of the line.

clear

Remove all of the points.

count

Return the number of points.

capacity

Return the capacity that was set during object construction. The capacity is the amount of memory reserved for storing the points on the path. This will be automatically updated when adding/removing points.

update_policy

Get or set how the primitive will be updated based on the current animation time.

polyline_type

Get or set how the primitive interprets the positions.

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.

display_outline

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

outline_width

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

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.

_new_enum

Return an enumerator that iterates through the collection.

central_body_clipped

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

Import detail#

from ansys.stk.core.graphics import PathPrimitive

Property detail#

property PathPrimitive.count: int#

Return the number of points.

property PathPrimitive.capacity: int#

Return the capacity that was set during object construction. The capacity is the amount of memory reserved for storing the points on the path. This will be automatically updated when adding/removing points.

property PathPrimitive.update_policy: IPathPrimitiveUpdatePolicy#

Get or set how the primitive will be updated based on the current animation time.

property PathPrimitive.polyline_type: PolylineType#

Get or set how the primitive interprets the positions.

property PathPrimitive.width: float#

Get or set the line width, in pixels.

property PathPrimitive.minimum_width_supported: float#

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

property PathPrimitive.maximum_width_supported: float#

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

property PathPrimitive.display_outline: bool#

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

property PathPrimitive.outline_width: float#

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

property PathPrimitive.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 PathPrimitive._new_enum: EnumeratorProxy#

Return an enumerator that iterates through the collection.

property PathPrimitive.central_body_clipped: bool#

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

Method detail#

PathPrimitive.item(self, index: int) PathPoint#

Return the point at the given zero-based index.

Parameters:

index : int

Returns:

PathPoint

PathPrimitive.add_front(self, path_point: PathPoint) None#

Add a path point to the front of the line.

Parameters:

path_point : PathPoint

Returns:

None

PathPrimitive.add_range_to_front(self, positions: list) None#

Add the range of path points to the front of the line.

Parameters:

positions : list

Returns:

None

PathPrimitive.add_back(self, path_point: PathPoint) None#

Add a path point to the back of the line.

Parameters:

path_point : PathPoint

Returns:

None

PathPrimitive.add_range_to_back(self, positions: list) None#

Add the range of path points to the back of the line.

Parameters:

positions : list

Returns:

None

PathPrimitive.remove_front(self) None#

Remove a path point to the front of the line.

Returns:

None

PathPrimitive.remove_all_before(self, index: int) None#

Remove all points before index.

Parameters:

index : int

Returns:

None

PathPrimitive.remove_back(self) None#

Remove a path point to the back of the line.

Returns:

None

PathPrimitive.remove_all_after(self, index: int) None#

Remove all points after index.

Parameters:

index : int

Returns:

None

PathPrimitive.front(self) PathPoint#

Access the path point at the front of the line.

Returns:

PathPoint

PathPrimitive.back(self) PathPoint#

Access the path point at the back of the line.

Returns:

PathPoint

PathPrimitive.clear(self) None#

Remove all of the points.

Returns:

None