ARKitCameraDevice Class¶
Description¶
ARKitCameraDevice implements a camera device based on 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.
ARKitCameraDevice 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_ARKitCameraDevice__ctor(easyar_ARKitCameraDevice * * Return)
- C++
ARKitCameraDevice()
- Java
public ARKitCameraDevice()
- Kotlin
constructor()
- Objective-C
+ (easyar_ARKitCameraDevice *) create
- Swift
public convenience init()
- C#
public ARKitCameraDevice()
isAvailable¶
Checks if the component is available. It returns true only on iOS 11 or later when ARKit is supported by hardware.
- C
bool easyar_ARKitCameraDevice_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_ARKitCameraDevice_bufferCapacity(const easyar_ARKitCameraDevice * 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_ARKitCameraDevice_setBufferCapacity(easyar_ARKitCameraDevice * 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)
inputFrameSource¶
InputFrame output port.
- C
void easyar_ARKitCameraDevice_inputFrameSource(easyar_ARKitCameraDevice * 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()
setFocusMode¶
Sets focus mode to focusMode. Call before start. Valid since iOS 11.3.
- C
void easyar_ARKitCameraDevice_setFocusMode(easyar_ARKitCameraDevice * This, easyar_ARKitCameraDeviceFocusMode focusMode)
- C++
void setFocusMode(ARKitCameraDeviceFocusMode focusMode)
- Java
public void setFocusMode(int focusMode)
- Kotlin
fun setFocusMode(focusMode: Int): Unit
- Objective-C
- (void)setFocusMode:(easyar_ARKitCameraDeviceFocusMode)focusMode
- Swift
public func setFocusMode(_ focusMode: ARKitCameraDeviceFocusMode) -> Void
- C#
public virtual void setFocusMode(ARKitCameraDeviceFocusMode focusMode)
start¶
Starts video stream capture.
- C
bool easyar_ARKitCameraDevice_start(easyar_ARKitCameraDevice * 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_ARKitCameraDevice_stop(easyar_ARKitCameraDevice * 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_ARKitCameraDevice_close(easyar_ARKitCameraDevice * 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()