One Logo Pool Ball
RoomPlan · IOS API REFERENCE

CapturedRoom

struct · iOS 16.0+ · SDK 27.1

struct CapturedRoom

A structure that provides the key details of a scanned room. This structure represents the post-processed result of the room-scanning process. Your app receives an instance of this structure through: - The view delegate (``RoomCaptureViewDelegate``) callback ``RoomCaptureViewDelegate/captureView(didPresent:error:)-4x0hd`` for an app that scans rooms using the framework-provided view (``RoomCaptureView``). - A room builder object (``RoomBuilder``) by calling ``RoomBuilder/capturedRoom(from:)`` for an app that provides its own room-scanning view, or processes the saved results of a prior scan. With the room details, an app can provide custom features, such as rendering the room and enabling the user to modify the position of its objects. You can export the current state of the room at any time to a USDZ file by calling ``CapturedRoom/export(to:metadataURL:modelProvider:exportOptions:)``.

Members (12)

get · iOS 16.0+

identifier

TypeScript
get identifier(): string
Swift declaration
var identifier: UUID { get }

A unique alphanumeric value that the framework assigns the room.

get · iOS 16.0+

doors

TypeScript
get doors(): Array<CapturedRoom_Surface>
Swift declaration
var doors: [CapturedRoom.Surface] { get }

An array of doors that the framework identifies during a scan.

get · iOS 17.0+

story

TypeScript
get story(): number
Swift declaration
var story: Int { get }

The story, floor number, or level on which the captured room resides within a larger structure.

get · iOS 16.0+

walls

TypeScript
get walls(): Array<CapturedRoom_Surface>
Swift declaration
var walls: [CapturedRoom.Surface] { get }

An array of walls that the framework identifies during a scan.

method · iOS 16.0+

export

TypeScript
exportToExportOptions(url: string, exportOptions?: CapturedRoom_USDExportOptions): void
Swift declaration
func export(to url: URL, exportOptions: CapturedRoom.USDExportOptions = .mesh) throws

Produces a 3D asset from the captured room. The file format of the output is Universal Scene Description (USD). > Tip: Before iOS 17.4, the first letter of the USD file name needs to be a character other than a number. - Parameter url: A location that the captured room exports to. - Parameter exportOptions: Options that determine the export's data format.

method · iOS 17.0+

export

TypeScript
exportToMetadataURLModelProviderExportOptions(url: string, metadataURL?: (string) | null, modelProvider?: (CapturedRoom_ModelProvider) | null, exportOptions?: CapturedRoom_USDExportOptions): void
Swift declaration
func export(to url: URL, metadataURL: URL? = nil, modelProvider: CapturedRoom.ModelProvider? = nil, exportOptions: CapturedRoom.USDExportOptions = .mesh) throws

Produces a 3D asset from the captured room with the given metadata output URL and model provider. The file format of the output is Universal Scene Description (USD). > Tip: Before iOS 17.4, the first letter of the USD file name needs to be a character other than a number. - Parameter url: A location that the captured room exports to. - Parameter metadataURL: A location that the captured room metadata exports to. - Parameter modelProvider: A collection of mappings of object categories and attributes to 3D model URLs. - Parameter exportOptions: Options that determine the export's data format.

get · iOS 17.0+

floors

TypeScript
get floors(): Array<CapturedRoom_Surface>
Swift declaration
var floors: [CapturedRoom.Surface] { get }

An array of floors that the framework identifies during a scan.

get · iOS 16.0+

objects

TypeScript
get objects(): Array<CapturedRoom_Object>
Swift declaration
var objects: [CapturedRoom.Object] { get }

An array of objects that the framework identifies during a scan.

get · iOS 17.0+

version

TypeScript
get version(): number
Swift declaration
var version: Int { get }

A version number for the captured room.

get · iOS 16.0+

windows

TypeScript
get windows(): Array<CapturedRoom_Surface>
Swift declaration
var windows: [CapturedRoom.Surface] { get }

An array of windows that the framework identifies during a scan.

get · iOS 16.0+

openings

TypeScript
get openings(): Array<CapturedRoom_Surface>
Swift declaration
var openings: [CapturedRoom.Surface] { get }

An array of openings that the framework identifies during a scan.

get · iOS 17.0+

sections

TypeScript
get sections(): Array<CapturedRoom_Section>
Swift declaration
var sections: [CapturedRoom.Section] { get }

One or more room types that the framework observes in the room.

Skipped declarations

No declarations were skipped in this snapshot.

All RoomPlan types →