Class ARKitCameraDevice
ARKitCameraDevice implements an ARKit-based camera device that outputs InputFrame (containing images, camera parameters, timestamps, 6DOF position information, and tracking status).
After creation, you can call start/stop to start and stop collecting video stream data.
When the device is no longer needed, you can call close to shut it down. Do not continue to use it after close.
ARKitCameraDevice outputs InputFrame through inputFrameSource. inputFrameSource should be connected to InputFrameSink for use.
bufferCapacity represents the capacity of the InputFrame buffer. If more than this number of InputFrame are output from this device and not released, the device will no longer output new InputFrame until the previous ones are released. This may cause issues such as screen freezing.
ARKitCameraDevice
Constructors
ARKitCameraDevice
void easyar_ARKitCameraDevice__ctor(easyar_ARKitCameraDevice * * Return)
public ARKitCameraDevice()
+ (easyar_ARKitCameraDevice *) create
public convenience init()
public ARKitCameraDevice()
Methods
isAvailable
Checks if it is available. Returns true only on iOS 11 or later systems and on hardware that supports ARKit.
bool easyar_ARKitCameraDevice_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
public static func isAvailable() -> Bool
public static bool isAvailable()
Returns
bufferCapacity
The capacity of the InputFrame buffer. The default value is 8.
int easyar_ARKitCameraDevice_bufferCapacity(const easyar_ARKitCameraDevice * This)
public int bufferCapacity()
fun bufferCapacity(): Int
public func bufferCapacity() -> Int32
public virtual int bufferCapacity()
Returns
setBufferCapacity
void easyar_ARKitCameraDevice_setBufferCapacity(easyar_ARKitCameraDevice * This, int capacity)
void setBufferCapacity(int capacity)
public void setBufferCapacity(int capacity)
fun setBufferCapacity(capacity: Int): Unit
- (void)setBufferCapacity:(int)capacity
public func setBufferCapacity(_ capacity: Int32) -> Void
public virtual void setBufferCapacity(int capacity)
Parameters
| Name |
Type |
Description |
| capacity |
Int32 |
|
Returns
void easyar_ARKitCameraDevice_inputFrameSource(easyar_ARKitCameraDevice * This, easyar_InputFrameSource * * Return)
std::shared_ptr<InputFrameSource> inputFrameSource()
public @Nonnull InputFrameSource inputFrameSource()
fun inputFrameSource(): InputFrameSource
- (easyar_InputFrameSource *)inputFrameSource
public func inputFrameSource() -> InputFrameSource
public virtual InputFrameSource inputFrameSource()
Returns
setFocusMode
Sets the focus mode to focusMode. Call before start. Valid from iOS 11.3 onwards.
void easyar_ARKitCameraDevice_setFocusMode(easyar_ARKitCameraDevice * This, easyar_ARKitCameraDeviceFocusMode focusMode)
void setFocusMode(ARKitCameraDeviceFocusMode focusMode)
public void setFocusMode(int focusMode)
fun setFocusMode(focusMode: Int): Unit
- (void)setFocusMode:(easyar_ARKitCameraDeviceFocusMode)focusMode
public func setFocusMode(_ focusMode: ARKitCameraDeviceFocusMode) -> Void
public virtual void setFocusMode(ARKitCameraDeviceFocusMode focusMode)
Parameters
Returns
start
Starts collecting video stream data.
bool easyar_ARKitCameraDevice_start(easyar_ARKitCameraDevice * This)
public func start() -> Bool
public virtual bool start()
Returns
stop
Stops collecting video stream data.
void easyar_ARKitCameraDevice_stop(easyar_ARKitCameraDevice * This)
public func stop() -> Void
public virtual void stop()
Returns
close
Closes. Do not continue to use after close.
void easyar_ARKitCameraDevice_close(easyar_ARKitCameraDevice * This)
public func close() -> Void
public virtual void close()
Returns
type
easyar_CameraDeviceType easyar_ARKitCameraDevice_type(const easyar_ARKitCameraDevice * This)
- (easyar_CameraDeviceType)type
public func type() -> CameraDeviceType
public virtual CameraDeviceType type()
Returns
cameraOrientation
The angle by which the camera image needs to be rotated clockwise to display in the device's natural orientation.
int easyar_ARKitCameraDevice_cameraOrientation(const easyar_ARKitCameraDevice * This)
public int cameraOrientation()
fun cameraOrientation(): Int
public func cameraOrientation() -> Int32
public virtual int cameraOrientation()
Returns
size
Gets the current image size.
easyar_Vec2I easyar_ARKitCameraDevice_size(const easyar_ARKitCameraDevice * This)
public @Nonnull Vec2I size()
public func size() -> Vec2I
public virtual Vec2I size()
Returns
frameRate
Gets the current frame rate.
double easyar_ARKitCameraDevice_frameRate(const easyar_ARKitCameraDevice * This)
public double frameRate()
public func frameRate() -> Double
public virtual double frameRate()
Returns
supportedSizeCount
Gets the number of all image sizes supported by the current device.
int easyar_ARKitCameraDevice_supportedSizeCount(const easyar_ARKitCameraDevice * This)
public int supportedSizeCount()
fun supportedSizeCount(): Int
- (int)supportedSizeCount
public func supportedSizeCount() -> Int32
public virtual int supportedSizeCount()
Returns
supportedSize
Gets the index-th image size supported by the current device. If index is out of range, returns {0, 0}.
easyar_Vec2I easyar_ARKitCameraDevice_supportedSize(const easyar_ARKitCameraDevice * This, int index)
Vec2I supportedSize(int index)
public @Nonnull Vec2I supportedSize(int index)
fun supportedSize(index: Int): Vec2I
- (easyar_Vec2I *)supportedSize:(int)index
public func supportedSize(_ index: Int32) -> Vec2I
public virtual Vec2I supportedSize(int index)
Parameters
| Name |
Type |
Description |
| index |
Int32 |
|
Returns
setSize
Sets the current image size. The closest possible value to the set value will be used. You can use size to get the actual size. After setting size, the frameRateRange may change.
bool easyar_ARKitCameraDevice_setSize(easyar_ARKitCameraDevice * This, easyar_Vec2I size)
public boolean setSize(@Nonnull Vec2I size)
fun setSize(size: Vec2I): Boolean
- (bool)setSize:(easyar_Vec2I *)size
public func setSize(_ size: Vec2I) -> Bool
public virtual bool setSize(Vec2I size)
Parameters
| Name |
Type |
Description |
| size |
Vec2I |
|
Returns
supportedFrameRateCount
Gets the number of frame rates supported by the current device.
int easyar_ARKitCameraDevice_supportedFrameRateCount(const easyar_ARKitCameraDevice * This)
int supportedFrameRateCount()
public int supportedFrameRateCount()
fun supportedFrameRateCount(): Int
- (int)supportedFrameRateCount
public func supportedFrameRateCount() -> Int32
public virtual int supportedFrameRateCount()
Returns
supportedFrameRate
Gets the index-th frame rate supported by the current device.
double easyar_ARKitCameraDevice_supportedFrameRate(const easyar_ARKitCameraDevice * This, int index)
double supportedFrameRate(int index)
public double supportedFrameRate(int index)
fun supportedFrameRate(index: Int): Double
- (double)supportedFrameRate:(int)index
public func supportedFrameRate(_ index: Int32) -> Double
public virtual double supportedFrameRate(int index)
Parameters
| Name |
Type |
Description |
| index |
Int32 |
|
Returns
setFrameRate
Sets the current frame rate of the current device.
bool easyar_ARKitCameraDevice_setFrameRate(easyar_ARKitCameraDevice * This, double frameRate)
bool setFrameRate(double frameRate)
public boolean setFrameRate(double frameRate)
fun setFrameRate(frameRate: Double): Boolean
- (bool)setFrameRate:(double)frameRate
public func setFrameRate(_ frameRate: Double) -> Bool
public virtual bool setFrameRate(double frameRate)
Parameters
| Name |
Type |
Description |
| frameRate |
Double |
|
Returns