class PointCloudVisualizer (Niantic.ARDK.Extensions.Scanning.PointCloudVisualizer)

Overview

Visualization of the scene as a point cloud. More…

class PointCloudVisualizer:
    MonoBehaviour,
    Niantic.ARDK.Extensions.Scanning.IScanVisualizer {
public:
    // fields

    AnimationCurve animationCurve;
    Material material;
    float updateInterval = 3f;

    // methods

    void ClearCurrentVisualizationState();
    void OnScanProgress(IVoxelBuffer voxels, IRaycastBuffer raycast);
    bool RequiresRaycastData();
    bool RequiresVoxelData();
    void SetVisualizationActive(bool active);
};

Inherited Members

public:
    // methods

    void ClearCurrentVisualizationState();
    void OnScanProgress(IVoxelBuffer voxels, IRaycastBuffer raycast);
    bool RequiresRaycastData();
    bool RequiresVoxelData();
    void SetVisualizationActive(bool active);

Detailed Documentation

Visualization of the scene as a point cloud.

This visualizer uses the IVoxelBuffer to render the reconstructed voxels in the scene as a point cloud overlaid on the AR view.

Fields

AnimationCurve animationCurve

Animation curve used to set the “_Progress” field on the material. This can be used to add time-based effects to the point cloud.

Material material

Material used to render the point cloud.

float updateInterval = 3f

Interval, in seconds, at which the voxel data is refreshed.

Methods

void ClearCurrentVisualizationState()

Called to reset the visualizer’s state. The previous voxel / raycast buffers are no longer valid.

void OnScanProgress(IVoxelBuffer voxels, IRaycastBuffer raycast)

Called when new scan visualization data is available. The visualizer should update its visualization to reflect the latest data.

Parameters:

voxels

Voxel data for the current scene. This will be null if RequiresVoxelData return false.

raycast

Buffer generated from a raycast of the scene from the current camera viewpoint. This will be null if RequiresRaycastData return false.

bool RequiresRaycastData()

Returns false since this visualizer does not use raycast data.

bool RequiresVoxelData()

Returns true since this visualizer uses voxel data.

void SetVisualizationActive(bool active)

Called when the visualizer should be enabled or disabled.

Parameters:

active

true if the visualization should be enabled