docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRCpuImage.Api

    An API for interacting with XRCpuImages.

    Inheritance
    object
    XRCpuImage.Api
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: solution.dll
    Syntax
    public abstract class XRCpuImage.Api
    Remarks

    This interface is intended to be implemented by AR platform providers (for example, ARCore, ARKit, and Open XR). The XRCpuImage uses it to make platform-specific API calls. Unity developers don't need to interact directly with this class; use the XRCpuImage instead.

    Methods

    Name Description
    ConvertAsync(int, ConversionParams)

    Method to be implemented by the provider to create an asynchronous request to convert a camera image, similar to TryConvert(int, ConversionParams, IntPtr, int) except the conversion should happen on a thread other than the calling (main) thread.

    ConvertAsync(int, ConversionParams, OnImageRequestCompleteDelegate, IntPtr)

    Method to be implemented by the provider. It is similar to ConvertAsync(int, ConversionParams) but takes a delegate to invoke when the request is complete, rather than returning a request id.

    DisposeAsyncRequest(int)

    Method to be implemented by the provider to dispose an existing async conversion request.

    DisposeImage(int)

    Method to be implemented by the provider to dispose an existing native image identified by nativeHandle.

    FormatSupported(XRCpuImage, TextureFormat)

    Determines whether a given TextureFormat is supported for image conversion.

    GetAsyncRequestStatus(int)

    Method to be implemented by the provider to get the status of an existing asynchronous conversion request.

    NativeHandleValid(int)

    Method to be implemented by the provider to determine whether a native image handle is currently valid. An image can become invalid if it has been disposed.

    TryConvert(int, ConversionParams, IntPtr, int)

    Method to be implemented by the provider to convert the image with handle nativeHandle using the provided conversionParams.

    TryGetAsyncRequestData(int, out IntPtr, out int)

    Method to be implemented by the provider to get a pointer to the image data from a completed asynchronous request. This method should only succeed if GetAsyncRequestStatus(int) returns Ready.

    TryGetConvertedDataSize(int, Vector2Int, TextureFormat, out int)

    Method to be implemented by the provider to get the number of bytes required to store an image with the given dimensions and TextureFormat.

    TryGetPlane(int, int, out Cinfo)

    Method to be implemented by the provider to get information about an image plane from a native image handle by index.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023