ModelPrimitive#

class ansys.stk.core.graphics.ModelPrimitive#

Bases: IPrimitive

The model primitive loads and renders COLLADA (DAE) and AGI MDL (MDL) models.

Overview#

load_with_string_uri

For convenience. Loads a COLLADA (DAE) or AGI MDL (MDL) model using a file path.

load_with_string_uri_and_up_axis

For convenience. Loads a COLLADA (DAE) or AGI MDL (MDL) model using a file path.

set_position_cartographic

For convenience. Sets the cartographic position of the model. This also sets position.

uri_as_string

Get the URI of the file used to load the file.

scale

Get or set the linear scale used to increase or decrease the size of the rendered model.

position

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.

orientation

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.

articulations

Get the model’s articulations. Articulations identify geometry and contain transformations for manipulating that geometry.

Import detail#

from ansys.stk.core.graphics import ModelPrimitive

Property detail#

property ModelPrimitive.uri_as_string: str#

Get the URI of the file used to load the file.

property ModelPrimitive.scale: float#

Get or set the linear scale used to increase or decrease the size of the rendered model.

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.

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.articulations: ModelArticulationCollection#

Get the model’s articulations. Articulations identify geometry and contain transformations for manipulating that geometry.

Method detail#

ModelPrimitive.load_with_string_uri(self, uri: str) None#

For convenience. Loads a COLLADA (DAE) or AGI MDL (MDL) model using a file path.

Parameters:

uri : str

Returns:

None

ModelPrimitive.load_with_string_uri_and_up_axis(self, uri: str, up_axis: ModelUpAxis) None#

For convenience. Loads a COLLADA (DAE) or AGI MDL (MDL) model using a file path.

Parameters:

uri : str

up_axis : ModelUpAxis

Returns:

None

ModelPrimitive.set_position_cartographic(self, central_body: str, position: list) None#

For convenience. Sets the cartographic position of the model. This also sets position.

Parameters:

central_body : str

position : list

Returns:

None