PrimitiveManager#

class ansys.stk.core.graphics.PrimitiveManager#

The primitive manager contains spatial data structures used to efficiently render primitives. Once a primitive is constructed, it must be added to the primitive manager before it will be rendered.

Overview#

add

Add a primitive to the manager. Primitives must be added to the manager to be rendered.

remove

Remove a primitive from the manager. The primitive is no longer rendered unless it is added back into the manager.

contains

Determine whether the manager contains a primitive.

clear

Remove all primitives from the manager.

count

Get the number of primitives in the manager.

precision_exponent

Do not use this property, as it is deprecated. This property is no longer in use Gets or sets the exponent used to compute the maximum precision for primitive rendering. For example, a value of -3 indicates the maximum precision of 2^-3, 0.125 m along the x, y, or z axis…

translucent_primitives_sort_order

Get or set the sort order for translucent primitives in the primitive manager. This determines a trade-off between rendering speed and quality…

_new_enum

Return an enumerator that iterates through the collection. The order of the primitives is not guaranteed to be the order that the primitives were added.

Import detail#

from ansys.stk.core.graphics import PrimitiveManager

Property detail#

property PrimitiveManager.count: int#

Get the number of primitives in the manager.

property PrimitiveManager.precision_exponent: int#

Do not use this property, as it is deprecated. This property is no longer in use Gets or sets the exponent used to compute the maximum precision for primitive rendering. For example, a value of -3 indicates the maximum precision of 2^-3, 0.125 m along the x, y, or z axis…

property PrimitiveManager.translucent_primitives_sort_order: PrimitivesSortOrder#

Get or set the sort order for translucent primitives in the primitive manager. This determines a trade-off between rendering speed and quality…

property PrimitiveManager._new_enum: EnumeratorProxy#

Return an enumerator that iterates through the collection. The order of the primitives is not guaranteed to be the order that the primitives were added.

Method detail#

PrimitiveManager.add(self, primitive: IPrimitive) None#

Add a primitive to the manager. Primitives must be added to the manager to be rendered.

Parameters:

primitive : IPrimitive

Returns:

None

PrimitiveManager.remove(self, primitive: IPrimitive) None#

Remove a primitive from the manager. The primitive is no longer rendered unless it is added back into the manager.

Parameters:

primitive : IPrimitive

Returns:

None

PrimitiveManager.contains(self, primitive: IPrimitive) bool#

Determine whether the manager contains a primitive.

Parameters:

primitive : IPrimitive

Returns:

bool

PrimitiveManager.clear(self) None#

Remove all primitives from the manager.

Returns:

None