docs.unity3d.com
    目次を表示する/隠す

    Struct XRCpuImage.AsyncConversion

    Holds information related to an asynchronous camera image conversion request. Returned by ConvertAsync(XRCpuImage.ConversionParams).

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public struct AsyncConversion : IDisposable, IEquatable<XRCpuImage.AsyncConversion>

    Properties

    conversionParams

    The XRCpuImage.ConversionParams used during the conversion.

    Declaration
    public XRCpuImage.ConversionParams conversionParams { readonly get; }
    Property Value
    Type Description
    XRCpuImage.ConversionParams

    The parameters used during the conversion.

    status

    The status of the request.

    Declaration
    public readonly XRCpuImage.AsyncConversionStatus status { get; }
    Property Value
    Type Description
    XRCpuImage.AsyncConversionStatus

    The status of the request.

    Methods

    Dispose()

    Dispose native resources associated with this request, including the raw image data. The NativeArray returned by GetData<T>() is invalidated immediately after calling Dispose().

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    Equals(Object)

    Tests for equality.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare against.

    Returns
    Type Description
    Boolean

    True if obj is of type XRCpuImage.AsyncConversion and Equals(XRCpuImage.AsyncConversion) also returns true; otherwise false.

    Overrides
    ValueType.Equals(Object)

    Equals(XRCpuImage.AsyncConversion)

    Tests for equality.

    Declaration
    public bool Equals(XRCpuImage.AsyncConversion other)
    Parameters
    Type Name Description
    XRCpuImage.AsyncConversion other

    The other XRCpuImage.AsyncConversion to compare against.

    Returns
    Type Description
    Boolean

    True if every field in other is equal to this XRCpuImage.AsyncConversion, otherwise false.

    Implements
    IEquatable<T>.Equals(T)

    GetData<T>()

    Get the raw image data. The returned NativeArray is a direct view into the native memory. The memory is only valid until this XRCpuImage.AsyncConversion is disposed.

    Declaration
    public NativeArray<T> GetData<T>()
        where T : struct
    Returns
    Type Description
    NativeArray<T>

    A new NativeArray representing the raw image data. This method might fail; use NativeArray.IsCreated to determine the validity of the data.

    Type Parameters
    Name Description
    T

    The type of data to return. No conversion is performed based on the type; this is only for access convenience.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the asynchronous conversion status is not Ready or if the conversion is invalid.

    GetHashCode()

    Generates a hash suitable for use with containers like HashSet and Dictionary.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code generated from this object's fields.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Generates a string representation of this XRCpuImage.AsyncConversion.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string representation of the conversion parameters.

    Overrides
    ValueType.ToString()

    Operators

    Equality(XRCpuImage.AsyncConversion, XRCpuImage.AsyncConversion)

    Tests for equality. Same as Equals(XRCpuImage.AsyncConversion).

    Declaration
    public static bool operator ==(XRCpuImage.AsyncConversion lhs, XRCpuImage.AsyncConversion rhs)
    Parameters
    Type Name Description
    XRCpuImage.AsyncConversion lhs

    The XRCpuImage.AsyncConversion to compare with rhs.

    XRCpuImage.AsyncConversion rhs

    The XRCpuImage.AsyncConversion to compare with lhs.

    Returns
    Type Description
    Boolean

    True if lhs is equal to rhs, otherwise false.

    Inequality(XRCpuImage.AsyncConversion, XRCpuImage.AsyncConversion)

    Tests for inequality. Same as !Equals(XRCpuImage.AsyncConversion).

    Declaration
    public static bool operator !=(XRCpuImage.AsyncConversion lhs, XRCpuImage.AsyncConversion rhs)
    Parameters
    Type Name Description
    XRCpuImage.AsyncConversion lhs

    The XRCpuImage.AsyncConversion to compare with rhs.

    XRCpuImage.AsyncConversion rhs

    The XRCpuImage.AsyncConversion to compare with lhs.

    Returns
    Type Description
    Boolean

    True if lhs is not equal to rhs, otherwise false.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)