modelFileURL(for:)
Provides a URL to a 3D model based on the given object’s attributes or category.
Declaration
func modelFileURL(for object: CapturedRoom.Object) throws -> URL?Parameters
- object:
The object whose attributes and category represent criteria for the model-URL query.
Return Value
The 3D model that the app associates to the given object’s attributes via setModelFileURL(_:for:) or its category via setModelFileURL(_:for:); or, nil if no 3D model URL associates to the given object’s category or combination of attributes.
Discussion
In error conditions, this function throws:
CapturedRoom.ModelProvider.Error.nonExistingFile(url:) if a 3D model doesn’t exist at the given URL.
CapturedRoom.ModelProvider.Error.attributeCombinationNotSupported if no object category supports all of the argument attributes.
Query supportedCombinations to check the attributes that an object category supports.