ModelPrimitive#
- class ansys.stk.core.graphics.ModelPrimitive#
Bases:
IPrimitive
The model primitive loads and renders glTF 2.0 (.gltf, .glb), COLLADA (DAE) and AGI MDL (MDL) models.
Overview#
Do not use this method, as it is deprecated. support for COLLADA 3D models has been removed 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. |
|
For convenience. Loads a glTF 2.0 (.gltf, .glb), COLLADA (DAE) or AGI MDL (MDL) model using a file path. |
|
For convenience. Loads a glTF 2.0 (.gltf, .glb), COLLADA (DAE) or AGI MDL (MDL) model using a file path. |
|
For convenience. Sets the cartographic position of the model. This also sets position. |
Get the modelβs articulations. Articulations identify geometry and contain transformations for manipulating that geometry. |
|
Get or set the modelβs orientation. The quaternion is a rotation from the modelβs local axes to the axes of the modelβs reference frame. |
|
Get or set the position of the model. The position is defined in the modelβs reference frame. The array contains the components of the position in the order x, y, z. |
|
Get or set the linear scale used to increase or decrease the size of the rendered model. |
|
Get the URI of the file used to load the file. |
Import detail#
from ansys.stk.core.graphics import ModelPrimitive
Property detail#
- property ModelPrimitive.articulations: ModelArticulationCollection#
Get the modelβs articulations. Articulations identify geometry and contain transformations for manipulating that geometry.
- property ModelPrimitive.orientation: IOrientation#
Get or set the modelβs orientation. The quaternion is a rotation from the modelβs local axes to the axes of the modelβs reference frame.
- property ModelPrimitive.position: list#
Get or set the position of the model. The position is defined in the modelβs reference frame. The array contains the components of the position in the order x, y, z.
Method detail#
- ModelPrimitive.allow_collada_models(self, allow: bool) None #
Do not use this method, as it is deprecated. support for COLLADA 3D models has been removed 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.
- ModelPrimitive.load_with_string_uri(self, uri: str) None #
For convenience. Loads a glTF 2.0 (.gltf, .glb), COLLADA (DAE) or AGI MDL (MDL) model using a file path.