<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RoomPlan",
  "identifier" : "/documentation/RoomPlan/CapturedRoom",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RoomPlan"
    ],
    "preciseIdentifier" : "s:8RoomPlan08CapturedA0V"
  },
  "title" : "CapturedRoom"
}
-->

# CapturedRoom

A structure that provides the key details of a scanned room.

```
struct CapturedRoom
```

## Overview

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`](/documentation/RoomPlan/RoomCaptureViewDelegate)) callback [`captureView(didPresent:error:)`](/documentation/RoomPlan/RoomCaptureViewDelegate/captureView(didPresent:error:))
  for an app that scans rooms using the framework-provided view ([`RoomCaptureView`](/documentation/RoomPlan/RoomCaptureView)).
- A room builder object ([`RoomBuilder`](/documentation/RoomPlan/RoomBuilder)) by calling [`capturedRoom(from:)`](/documentation/RoomPlan/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 [`export(to:metadataURL:modelProvider:exportOptions:)`](/documentation/RoomPlan/CapturedRoom/export(to:metadataURL:modelProvider:exportOptions:)).

## Topics

### Creating a captured room

[`init(from:)`](/documentation/RoomPlan/CapturedRoom/init(from:))

Creates a captured room by deserializing the decoder of a previously captured room.

### Inspecting room details

[`identifier`](/documentation/RoomPlan/CapturedRoom/identifier)

A unique alphanumeric value that the framework assigns the room.

[`story`](/documentation/RoomPlan/CapturedRoom/story)

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

[`floors`](/documentation/RoomPlan/CapturedRoom/floors)

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

[`Surface`](/documentation/RoomPlan/CapturedRoom/Surface)

A 2D area in a room that the framework identifies as a surface.

[`doors`](/documentation/RoomPlan/CapturedRoom/doors)

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

[`objects`](/documentation/RoomPlan/CapturedRoom/objects)

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

[`Object`](/documentation/RoomPlan/CapturedRoom/Object)

A 3D area in a room that the framework identifies as an object.

[`openings`](/documentation/RoomPlan/CapturedRoom/openings)

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

[`walls`](/documentation/RoomPlan/CapturedRoom/walls)

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

[`windows`](/documentation/RoomPlan/CapturedRoom/windows)

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

[`sections`](/documentation/RoomPlan/CapturedRoom/sections)

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

[`Section`](/documentation/RoomPlan/CapturedRoom/Section)

An object that identifies a particular area in a captured room in relation to common types of room areas in a building.

[`Confidence`](/documentation/RoomPlan/CapturedRoom/Confidence)

Levels of certainty in the classification of a particular detail in a scan.

[`version`](/documentation/RoomPlan/CapturedRoom/version)

A version number for the captured room.

### Serializing a captured room

[`encode(to:)`](/documentation/RoomPlan/CapturedRoom/encode(to:))

Serializes a captured room to the specified encoder.

[`AttributesCodableRepresentation`](/documentation/RoomPlan/CapturedRoom/AttributesCodableRepresentation)

A serializable set of details that describe an object in the room.

### Generating a USDZ file

[`export(to:exportOptions:)`](/documentation/RoomPlan/CapturedRoom/export(to:exportOptions:))

Produces a 3D asset from the captured room.

[`export(to:metadataURL:modelProvider:exportOptions:)`](/documentation/RoomPlan/CapturedRoom/export(to:metadataURL:modelProvider:exportOptions:))

Produces a 3D asset from the captured room with the given metadata output URL and model provider.

[`USDExportOptions`](/documentation/RoomPlan/CapturedRoom/USDExportOptions)

Options that determine the underlying data format of a scan export.

[`ModelProvider`](/documentation/RoomPlan/CapturedRoom/ModelProvider)

A structure that assigns detailed 3D models to captured objects for an export.

### Handling errors

[`Error`](/documentation/RoomPlan/CapturedRoom/Error)

Errors that can occur during a captured room export.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)