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: 23.1.416.0 (23.1.416.0)
public void Load(
	Uri uri,
	ModelUpAxis upAxis


Type: SystemUri
The URI of the model file to load.
Type: AGI.Foundation.GraphicsModelUpAxis
The axis representing the up direction of the model file.
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.

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