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

Overview

Visualization of world-space position and normal data derived from an IRaycastBuffer. More…

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

    AnimationCurve animationCurve;
    Material material;

    // 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 world-space position and normal data derived from an IRaycastBuffer.

To customize the visualization, set the “Material” field to be a Unity Material that implements the desired visualization.

Fields

AnimationCurve animationCurve

Animation curve that can be used to implement time-based effects in the shader.

Material material

Material implementing the visualization. See ScreenSpaceNormalPointCloud.shader for an example.

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 true since this visualizer uses the raycast data.

bool RequiresVoxelData()

Returns false since this visualizer does not use voxel data.

void SetVisualizationActive(bool active)

Called when the visualizer should be enabled or disabled.

Parameters:

active

true if the visualization should be enabled