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
PointCloudPreviewViewController has been renamed more appropriately to ScenePreviewViewController
ScenePreviewViewController now requires its properties be injected at construction. Each init method requires a certain set of parameters which should make it more obvious how the rendering / mesh construction occur perform based on inputs. (This shouldn’t impact data flow since the rendering of a point cloud previously required properties be set before init anyway).
This PR refactors
PointCloudPreviewViewController
so that it is now compatible withSCScene
(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 whatSCScene
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
andmesh
properties may be null, butrootNode
always exists.ScenePreviewViewController
now usesrootNode
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
PointCloudPreviewViewController
has been renamed more appropriately toScenePreviewViewController
ScenePreviewViewController
now requires its properties be injected at construction. Each init method requires a certain set of parameters which should make it more obvious how the rendering / mesh construction occur perform based on inputs. (This shouldn’t impact data flow since the rendering of a point cloud previously required properties be set before init anyway).