class ARDepthManager (Niantic.ARDK.Extensions.ARDepthManager)

Overview

class ARDepthManager: Niantic.ARDK.Rendering.ARRenderFeatureProvider {
public:
    // enums

    enum OcclusionMode;

    // properties

    IDepthBuffer CPUDepth;
    IDepthBufferProcessor DepthBufferProcessor;
    Matrix4x4 DepthTransform;
    Texture GPUDepth;
    bool IsDepthNormalized;
    DepthMeshOccluder MeshOccluder;
    OcclusionMode OcclusionTechnique;

    // events

    event DepthBufferInitialized();
    event DepthBufferUpdated();

    // methods

    virtual override void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties);
    void ToggleDebugVisualization(bool isEnabled);
    virtual override void UpdateRenderState(Material material);
};

Inherited Members

public:
    // properties

    bool AreFeaturesEnabled;
    bool CanInitialize;
    bool Initialized;
    ISet<string> Features;
    RenderTarget? Target;
    ArdkEventHandler<RenderFeaturesChangedArgs> ActiveFeaturesChanged;
    ISet<string>?? Features;
    RenderTarget? Target;

    // events

    event ActiveFeaturesChanged();

    // methods

    void Deinitialize();
    void DisableFeatures();
    void EnableFeatures();
    void Initialize();
    virtual abstract void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties) = 0;
    void UpdateRenderState(Material material);
    virtual abstract void UpdateRenderState(Material material) = 0;

Detailed Documentation

Properties

IDepthBuffer CPUDepth

Returns the latest depth buffer on CPU memory. This buffer is not displayed aligned, and needs to be sampled with the DepthTransform property.

IDepthBufferProcessor DepthBufferProcessor

Returns the underlying context awareness processor.

Matrix4x4 DepthTransform

Returns a transformation that fits the depth buffer to the target viewport.

Texture GPUDepth

Returns the latest depth buffer on GPU memory. The resulting texture is not display aligned, and needs to be used with the DepthTransform property.

Events

event DepthBufferInitialized()

Event for when the first depth buffer is received.

event DepthBufferUpdated()

Event for when the contents of the depth buffer or its affine transform was updated.

Methods

virtual override void ApplyARConfigurationChange(ARSessionChangesCollector.ARSessionRunProperties properties)

Inheritors should override this to modify session configuration settings based on their script’s needs.

Note

This is executed as a result of the ARSession being run, which may or may not be triggered by a call to RaiseConfigurationChanged().

virtual override void UpdateRenderState(Material material)

Called when it is time to copy the current render state to the main rendering material.

Parameters:

material

Material used to render the frame.