# Generate Source: https://www.nianticspatial.com/docs/api/unity/NianticSpatial.NSDK.AR.Occlusion.NsdkPointCloudGenerator.Generate/ Generate Generate a point cloud from a depth texture using the given intrinsics and extrinsics. --- ## Declaration public Vector4[] Generate(Texture depth, XRCameraIntrinsics intrinsics, Matrix4x4 extrinsics) #### Summary Generate a point cloud from a depth texture using the given intrinsics and extrinsics. #### Remarks This is an allocating, blocking call. #### Returns A collection of 3D points generated from the image. ### Parameters | Name | Type | Summary | | --- | --- | --- | | depth | Texture | The depth image. | | intrinsics | XRCameraIntrinsics | The camera intrinsic parameters for the depth image. | | extrinsics | Matrix4x4 | The camera to world transform. | --- ## Overload 1 public Vector4[] Generate(Texture depth, Matrix4x4 intrinsics, Matrix4x4 extrinsics) #### Summary Generate a point cloud from a depth texture using the given intrinsics and extrinsics. #### Remarks This is an allocating, blocking call. #### Returns A collection of 3D points generated from the image. ### Parameters | Name | Type | Summary | | --- | --- | --- | | depth | Texture | The depth image. | | intrinsics | XRCameraIntrinsics | The camera intrinsic parameters for the depth image. | | extrinsics | Matrix4x4 | The camera to world transform. | --- ## Overload 2 public void Generate(Texture depth, XRCameraIntrinsics intrinsics, Matrix4x4 extrinsics, ref Vector4[] result) #### Summary Generate a point cloud from a depth texture using the given intrinsics and extrinsics. #### Remarks This is a non-allocating, blocking call. ### Parameters | Name | Type | Summary | | --- | --- | --- | | depth | Texture | The depth image. | | intrinsics | XRCameraIntrinsics | The camera intrinsic parameters for the depth image. | | extrinsics | Matrix4x4 | The camera to world transform. | --- ## Overload 3 public void Generate(Texture depth, Matrix4x4 intrinsics, Matrix4x4 extrinsics, ref Vector4[] result) #### Summary Generate a point cloud from a depth texture using the given intrinsics and extrinsics. #### Remarks This is a non-allocating, blocking call. ### Parameters | Name | Type | Summary | | --- | --- | --- | | depth | Texture | The depth image. | | intrinsics | XRCameraIntrinsics | The camera intrinsic parameters for the depth image. | | extrinsics | Matrix4x4 | The camera to world transform. | ---