ModelPrimitiveFactory#

class ansys.stk.core.graphics.ModelPrimitiveFactory#

The model primitive loads and renders glTF 2.0 (.gltf, .glb), COLLADA (DAE) and AGI MDL (MDL) models.

Overview#

allow_collada_models

Support for loading COLLADA 3D model format has been officially removed. This method will allow users to continue loading COLLADA models for a short period of time.

initialize

Initialize a default model primitive.

initialize_with_string_uri

For convenience. Initializes a model primitive with the specified file path.

initialize_with_string_uri_and_up_axis

For convenience. Initializes a model primitive with the specified file path and up axis.

Import detail#

from ansys.stk.core.graphics import ModelPrimitiveFactory

Method detail#

ModelPrimitiveFactory.allow_collada_models(self, allow: bool) None#

Support for loading COLLADA 3D model format has been officially removed. This method will allow users to continue loading COLLADA models for a short period of time.

Parameters:

allow : bool

Returns:

None

ModelPrimitiveFactory.initialize(self) ModelPrimitive#

Initialize a default model primitive.

Returns:

ModelPrimitive

ModelPrimitiveFactory.initialize_with_string_uri(self, uri: str) ModelPrimitive#

For convenience. Initializes a model primitive with the specified file path.

Parameters:

uri : str

Returns:

ModelPrimitive

ModelPrimitiveFactory.initialize_with_string_uri_and_up_axis(self, uri: str, up_axis: ModelUpAxis) ModelPrimitive#

For convenience. Initializes a model primitive with the specified file path and up axis.

Parameters:

uri : str

up_axis : ModelUpAxis

Returns:

ModelPrimitive