I'm writing an app that uses the RoomPlan APIs, which works great. But it seems the view after the scan that lets you see the scan in 3-D space can only appear after performing the scan. Is there a way to use the CapturedRoom data from a previous scan to instantiate this view again, without having to perform the whole scan again? I can't see to find anything in the API docs that handles this case. Any help would be appreciated.
More info:
The delegate has this contract:
func captureView(shouldPresent roomDataForProcessing: CapturedRoomData, error: Error?) -> Bool {
return true
}
How can I present the room for processing by pre-seeding with an already existing CapturedRoom object, and skip the scanning part?
I'm investigating this as well, and don't have an answer on how to use the
CapturedRoomstruct just yet. Still trying.As a temporary solution, I export the
CapturedRoomstruct as a USDZ file and save it in the app's sandbox directory. I then useSceneKitto fetch the newly savedUSDZfile and display it as needed. Here's my implementation:In my RoomCaptureViewController
Note: This is a modified version of the RoomPlan sample code on Apple's Developer website: https://developer.apple.com/documentation/roomplan/create_a_3d_model_of_an_interior_room_by_guiding_the_user_through_an_ar_experience
I'm using a closure to show the USDZ file in my previous view, hence the
onDismiss(?[destinationURL, capturedRoomURL]). In which I use thedestinationURLas follows: