boundingBox(atTime:)
Returns the minimum region entirely enclosing the object’s contents at the specified time sample.
Declaration
func boundingBox(atTime time: TimeInterval) -> MDLAxisAlignedBoundingBoxParameters
- time:
A timestamp referring to timed information in the asset.
Return Value
The asset’s bounding box as of the specified time sample.
Discussion
Objects may or may not provide spatial content. Subclasses of MDLObject that include spatial content, such as the MDLMesh class, implement this method to return the axis-aligned minimal region that entirely encloses such content. Objects without spatial content return an empty bounding box—that is, a MDLAxisAlignedBoundingBox structure whose minBounds field is greater than its maxBounds field.
Calling this method on an object that contains other objects (that is, one whose children property is not nil and references a nonempty container) recursively computes the combined bounding box enclosing of the object’s children.