CompositePrimitive#

class ansys.stk.core.graphics.CompositePrimitive#

Bases: IPrimitive

A primitive that is composed of multiple other primitives. Since composites can contain other composites, they are commonly used to build hierarchies of primitives to efficiently evaluate display conditions…

Overview#

add

Add a primitive to the composite.

remove

Remove a primitive from the composite.

contains

Determine whether the composite contains a primitive.

clear

Remove all primitives from the composite.

count

Get the number of primitives in the composite.

translucent_primitives_sort_order

Get or set the sort order for translucent primitives in this composite. 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 CompositePrimitive

Property detail#

property CompositePrimitive.count: int#

Get the number of primitives in the composite.

property CompositePrimitive.translucent_primitives_sort_order: PrimitivesSortOrder#

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

property CompositePrimitive._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#

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

Add a primitive to the composite.

Parameters:

primitive : IPrimitive

Returns:

None

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

Remove a primitive from the composite.

Parameters:

primitive : IPrimitive

Returns:

None

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

Determine whether the composite contains a primitive.

Parameters:

primitive : IPrimitive

Returns:

bool

CompositePrimitive.clear(self) None#

Remove all primitives from the composite.

Returns:

None