Instance Method

visualBounds(recursive:relativeTo:excludeInactive:)

Computes a bounding box for the entity in the specified space, optionally including child entities.

Declaration

func visualBounds(recursive: Bool = true, relativeTo referenceEntity: Entity?, excludeInactive: Bool = false) -> BoundingBox

Parameters

recursive

A Boolean that you set to true to incorporate the bounds of all descendants.

referenceEntity

The entity that defines a frame of reference. Set this to nil to indicate world space.

excludeInactive

A Boolean that you set to true to exclude inactive entities.

Return Value

The bounding box.

Discussion

The method has complexity O(n), where n is the number of entities in the hierarchy.