template class AwarenessBufferProcessor (Niantic.ARDK.AR.Awareness.AwarenessBufferProcessor)

Overview

Base class for components that extract information from IAwarenessBuffer objects to be used in game logic and rendering. More…

template <TBuffer>
class AwarenessBufferProcessor {
public:
    // properties

    TBuffer AwarenessBuffer;
    ArdkEventHandler<ContextAwarenessArgs<TBuffer>> AwarenessStreamBegan;
    Vector2Int CurrentViewportResolution;
    InterpolationMode InterpolationMode;
    float InterpolationPreference;
    Matrix4x4 SamplerTransform;

    // events

    event AwarenessStreamUpdated();

    // methods

    void Dispose();
};

// direct descendants

class DepthBufferProcessor;
class SemanticBufferProcessor;

Detailed Documentation

Base class for components that extract information from IAwarenessBuffer objects to be used in game logic and rendering.

Properties

TBuffer AwarenessBuffer

The CPU copy of the latest awareness buffer.

ArdkEventHandler<ContextAwarenessArgs<TBuffer>> AwarenessStreamBegan

Event for when the context awareness feature stream has initialized and the application received its initial frame.

Vector2Int CurrentViewportResolution

The resolution of the viewport, awareness buffers are being mapped to.

InterpolationMode InterpolationMode

The current interpolation setting.

float InterpolationPreference

The current setting whether to align with close (0.0f) or distant pixels (1.0f) during interpolation.

Matrix4x4 SamplerTransform

A composited matrix to fit the awareness buffer to the screen. This affine transform converts normalized screen coordinates to the buffer’s coordinate frame while accounting for interpolation.

Events

event AwarenessStreamUpdated()

Alerts subscribers when either the contents of the awareness buffer or its sampler transform has changed.