Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.Utilities ←ImageSamplingUtils

Sample


Declaration​

public static T Sample<T>(this NativeArray<T> data, int width, int height, Vector2 uv) where T : struct

Parameters​

NameTypeSummary
dataNativeArray<T>
The native array containing the data.
widthint
The width of the image.
heightint
The height of the image.
uvVector2
Normalized image coordinates to sample.

Overload 1​

public static T Sample<T>(this XRCpuImage image, Vector2 uv, Matrix4x4 transform, int plane = 0) where T : struct

Parameters​

NameTypeSummary
dataNativeArray<T>
The native array containing the data.
widthint
The width of the image.
heightint
The height of the image.
uvVector2
Normalized image coordinates to sample.

Overload 2​

public static T Sample<T>(this NativeArray<T> data, int width, int height, Vector2 uv, Matrix4x4 transform) where T : struct

Parameters​

NameTypeSummary
dataNativeArray<T>
The native array containing the data.
widthint
The width of the image.
heightint
The height of the image.
uvVector2
Normalized image coordinates to sample.