class RaycastScanVisualizer (Niantic.ARDK.Extensions.Scanning.RaycastScanVisualizer)
Overview
Visualization that renders a raycast of the scene (Built-in Render Pipeline version). More…
class RaycastScanVisualizer: MonoBehaviour, Niantic.ARDK.Extensions.Scanning.IScanVisualizer { public: // 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 that renders a raycast of the scene (Built-in Render Pipeline version).
The visualization can be customized by setting the “Material” field to be a Unity Material with a shader that implements the desired visualization.
Note
This component should be added to the GameObject containing the main camera in the Unity scene.
Note
If you are using the Universal Render Pipeline, you should use UrpRaycastScanVisualizer instead.
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 |