class ScanningOptions (Niantic.ARDK.AR.Scanning.ScanningOptions)

Overview

Options controlling the scan capture process. More…

class ScanningOptions {
public:
    // structs

    struct NativeScanningOptions;

    // properties

    bool EnableRaycastVisualization;
    bool EnableVoxelVisualization;
    float MaxScanningDistance;
    Vector2 RaycastResolution;

    // methods

    ScanningOptions(
        bool enableRaycastVisualization = true,
        bool enableVoxelVisualization = true,
        float maxScanningDistance = 5,
        int scanRecordFps = 3,
        Vector2 raycastResolution = default
    );
};

Detailed Documentation

Options controlling the scan capture process.

Properties

bool EnableRaycastVisualization

If true, raycast-based visualizations are enabled. The IScanner.VisualizationUpdated event will contain an IRaycastBuffer.

bool EnableVoxelVisualization

If true, voxel-based visualizations are enabled. The IScanner.VisualizationUpdated event will contain an IVoxelBuffer that can be used to render voxel-based visualizations.

float MaxScanningDistance

Maximum range, in meters, at which the scanner will collect data.

Vector2 RaycastResolution

The resolution of the raycast visualization’s output images. The output quality is bound by both this resolution as well as the quality of the underlying 3D reconstruction data. On devices without native depth support, the underlying data is unlikely to be good enough to support resolution larger than 256x144.

Methods

ScanningOptions(
    bool enableRaycastVisualization = true,
    bool enableVoxelVisualization = true,
    float maxScanningDistance = 5,
    int scanRecordFps = 3,
    Vector2 raycastResolution = default
)

Constructs scanning options.

Parameters:

enableRaycastVisualization

If true, raycast-based visualizations will be enabled.

enableVoxelVisualization

If true, voxel-based visualizations will be enabled.

maxScanningDistance

Maximum range, in meters, at which the scanner will collect data. This should be set to values between 0.1 and 5.0 meters and will be clamped to this range if not. When capturing scans for VPS activation, this parameter should be set to 5.

scanRecordFps

The rate at which images in the scan will be recorded, expressed in frames per second. This should be set to a value between 1 and 15 and will be clamped to this range if not. When capturing scans for VPS activation, this parameter should be set to 15 fps. In other cases, a lower frame rate such as 3 can lead to faster reconstruction without loss of quality.

raycastResolution

The resolution for the raycast visualization. The result image is bound by both this as well as the precision of the depth input. It is clamped between 10x10 and 1024x1024. Will have no effect if enableRaycastVisualization is false. Higher values impact performance. Default is 256x144.