StandardCyborg / StandardCyborgCocoa

Everything you need for 3D scanning on iOS
https://www.standardcyborg.com
Other
143 stars 49 forks source link

Update Example app with meshing and scenes #15

Closed irtemed88 closed 4 years ago

irtemed88 commented 4 years ago

This PR refactors PointCloudPreviewViewController so that it is now compatible with SCScene (and consequently supports Mesh processing and rendering).

Until now scans were rendered solely as point clouds via StandardCyborgFusion’s SCPointCloud objects. Point clouds were stored as .ply files which has been deprecated in favor of .gtlf which is what SCScene objects use. In addition to point clouds, scenes also support meshes. Meshes are processed asynchronously out-of-band from the scanning process and as such necessitated updating how data flowed through and ultimately was rendered in PointCloudPreviewViewController.

With SCScene we also have easy access to a SceneKit node encapsulating all the nodes in the scene. When an SCScene is created its pointCloud and mesh properties may be null, but rootNode always exists. ScenePreviewViewController now uses rootNode for rendering and references the pointCloud and mesh nodes internally (i.e. we've removed explicit management of point cloud and mesh nodes).

Breaking changes