Click or drag to resize

ModelPrimitiveLoad Method (Uri, ModelUpAxis)

Loads a glTF 2.0 (.gltf, .glb), COLLADA (DAE) or AGI MDL (MDL) model using the specified uri and upAxis.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public void Load(
	Uri uri,
	ModelUpAxis upAxis
)

Parameters

uri
Type: SystemUri
The URI of the model file to load.
upAxis
Type: AGI.Foundation.GraphicsModelUpAxis
The axis representing the up direction of the model file.
Exceptions
ExceptionCondition
FileNotFoundException Could not find or access uri.
ArgumentException Only file URIs are supported at this time. uri must start with file:///.
ArgumentException Only MDL models can have their up axis specified.
Remarks

If the model includes articulations, they can be accessed using Articulations.

If the model's AutomaticallyComputeBoundingSphere property is true, BoundingSphere is set to fit around the model. Otherwise, it is the caller's responsibility to update the model's BoundingSphere to a sphere that encompasses the model.

Loading a new model does not change the model's Position, Orientation, or Scale.

See Also