VisionOSARKitCameraDevice Class

Description

VisionOSARKitCameraDevice implements a camera device based on VisionOS ARKit, which outputs InputFrame (including image, camera parameters, timestamp, 6DOF location, and tracking status).

After creation, start/stop can be invoked to start or stop data collection.

When the component is not needed anymore, call close function to close it. It shall not be used after calling close.

VisionOSARKitCameraDevice outputs InputFrame from inputFrameSource. inputFrameSource shall be connected to InputFrameSink for use. Refer to Overview .

bufferCapacity is the capacity of InputFrame buffer. If the count of InputFrame which has been output from the device and have not been released is more than this number, the device will not output new InputFrame , until previous InputFrame have been released. This may cause screen stuck. Refer to Overview .

Constructor

C

void easyar_VisionOSARKitCameraDevice__ctor(easyar_VisionOSARKitCameraDevice * * Return)

C++

VisionOSARKitCameraDevice()

Java

public VisionOSARKitCameraDevice()

Kotlin

constructor()

Objective-C

+ (easyar_VisionOSARKitCameraDevice *) create

Swift

public convenience init()

C#

public VisionOSARKitCameraDevice()

isAvailable

C

bool easyar_VisionOSARKitCameraDevice_isAvailable(void)

C++

static bool isAvailable()

Java

public static boolean isAvailable()

Kotlin

companion object fun isAvailable(): Boolean

Objective-C

+ (bool)isAvailable

Swift

public static func isAvailable() -> Bool

C#

public static bool isAvailable()

bufferCapacity

InputFrame buffer capacity. The default is 8.

C

int easyar_VisionOSARKitCameraDevice_bufferCapacity(const easyar_VisionOSARKitCameraDevice * This)

C++

int bufferCapacity()

Java

public int bufferCapacity()

Kotlin

fun bufferCapacity(): Int

Objective-C

- (int)bufferCapacity

Swift

public func bufferCapacity() -> Int32

C#

public virtual int bufferCapacity()

setBufferCapacity

Sets InputFrame buffer capacity.

C

void easyar_VisionOSARKitCameraDevice_setBufferCapacity(easyar_VisionOSARKitCameraDevice * This, int capacity)

C++

void setBufferCapacity(int capacity)

Java

public void setBufferCapacity(int capacity)

Kotlin

fun setBufferCapacity(capacity: Int): Unit

Objective-C

- (void)setBufferCapacity:(int)capacity

Swift

public func setBufferCapacity(_ capacity: Int32) -> Void

C#

public virtual void setBufferCapacity(int capacity)

requestPermissions

Requests necessary permissions from VisionOS including [World Sensing] and [Camera Access]

C

void easyar_VisionOSARKitCameraDevice_requestPermissions(easyar_VisionOSARKitCameraDevice * This, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromPermissionStatusAndString permissionCallback)

C++

void requestPermissions(std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(PermissionStatus, std::string)>> permissionCallback)

Java

public void requestPermissions(@Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromPermissionStatusAndString permissionCallback)

Kotlin

fun requestPermissions(callbackScheduler: CallbackScheduler, permissionCallback: FunctorOfVoidFromPermissionStatusAndString?): Unit

Objective-C

- (void)requestPermissions:(easyar_CallbackScheduler *)callbackScheduler permissionCallback:(void (^)(easyar_PermissionStatus status, NSString * value))permissionCallback

Swift

public func requestPermissions(_ callbackScheduler: CallbackScheduler, _ permissionCallback: ((PermissionStatus, String) -> Void)?) -> Void

C#

public virtual void requestPermissions(CallbackScheduler callbackScheduler, Optional<Action<PermissionStatus, string>> permissionCallback)

inputFrameSource

InputFrame output port.

C

void easyar_VisionOSARKitCameraDevice_inputFrameSource(easyar_VisionOSARKitCameraDevice * This, easyar_InputFrameSource * * Return)

C++

std::shared_ptr<InputFrameSource> inputFrameSource()

Java

public @Nonnull InputFrameSource inputFrameSource()

Kotlin

fun inputFrameSource(): InputFrameSource

Objective-C

- (easyar_InputFrameSource *)inputFrameSource

Swift

public func inputFrameSource() -> InputFrameSource

C#

public virtual InputFrameSource inputFrameSource()

getMotionInputData

Get synchoronous motion input data.

C

void easyar_VisionOSARKitCameraDevice_getMotionInputData(easyar_VisionOSARKitCameraDevice * This, easyar_OptionalOfMotionInputData * Return)

C++

std::optional<std::shared_ptr<MotionInputData>> getMotionInputData()

Java

public @Nullable MotionInputData getMotionInputData()

Kotlin

fun getMotionInputData(): MotionInputData?

Objective-C

- (easyar_MotionInputData *)getMotionInputData

Swift

public func getMotionInputData() -> MotionInputData?

C#

public virtual Optional<MotionInputData> getMotionInputData()

start

Starts video stream capture.

C

bool easyar_VisionOSARKitCameraDevice_start(easyar_VisionOSARKitCameraDevice * This)

C++

bool start()

Java

public boolean start()

Kotlin

fun start(): Boolean

Objective-C

- (bool)start

Swift

public func start() -> Bool

C#

public virtual bool start()

stop

Stops video stream capture.

C

void easyar_VisionOSARKitCameraDevice_stop(easyar_VisionOSARKitCameraDevice * This)

C++

void stop()

Java

public void stop()

Kotlin

fun stop(): Unit

Objective-C

- (void)stop

Swift

public func stop() -> Void

C#

public virtual void stop()

close

Close. The component shall not be used after calling close.

C

void easyar_VisionOSARKitCameraDevice_close(easyar_VisionOSARKitCameraDevice * This)

C++

void close()

Java

public void close()

Kotlin

fun close(): Unit

Objective-C

- (void)close

Swift

public func close() -> Void

C#

public virtual void close()

size

Gets the current preview size.

C

easyar_Vec2I easyar_VisionOSARKitCameraDevice_size(const easyar_VisionOSARKitCameraDevice * This)

C++

Vec2I size()

Java

public @Nonnull Vec2I size()

Kotlin

fun size(): Vec2I

Objective-C

- (easyar_Vec2I *)size

Swift

public func size() -> Vec2I

C#

public virtual Vec2I size()

type

Camera type.

C

easyar_CameraDeviceType easyar_VisionOSARKitCameraDevice_type(const easyar_VisionOSARKitCameraDevice * This)

C++

CameraDeviceType type()

Java

public int type()

Kotlin

fun type(): Int

Objective-C

- (easyar_CameraDeviceType)type

Swift

public func type() -> CameraDeviceType

C#

public virtual CameraDeviceType type()

cameraOrientation

Angles rotation required to rotate clockwise and display camera image on device with natural orientation.

C

int easyar_VisionOSARKitCameraDevice_cameraOrientation(const easyar_VisionOSARKitCameraDevice * This)

C++

int cameraOrientation()

Java

public int cameraOrientation()

Kotlin

fun cameraOrientation(): Int

Objective-C

- (int)cameraOrientation

Swift

public func cameraOrientation() -> Int32

C#

public virtual int cameraOrientation()

frameRateRangeLower

Gets lower bound of current frame rate range.

C

double easyar_VisionOSARKitCameraDevice_frameRateRangeLower(const easyar_VisionOSARKitCameraDevice * This)

C++

double frameRateRangeLower()

Java

public double frameRateRangeLower()

Kotlin

fun frameRateRangeLower(): Double

Objective-C

- (double)frameRateRangeLower

Swift

public func frameRateRangeLower() -> Double

C#

public virtual double frameRateRangeLower()

frameRateRangeUpper

Gets upper bound of current frame rate range.

C

double easyar_VisionOSARKitCameraDevice_frameRateRangeUpper(const easyar_VisionOSARKitCameraDevice * This)

C++

double frameRateRangeUpper()

Java

public double frameRateRangeUpper()

Kotlin

fun frameRateRangeUpper(): Double

Objective-C

- (double)frameRateRangeUpper

Swift

public func frameRateRangeUpper() -> Double

C#

public virtual double frameRateRangeUpper()