InertialCameraDevice Class

Description

InertialCameraDevice implements an inertial camera device, which outputs InputFrame which CameraTransformType is FiveDofRotXZ (including image, camera parameters, timestamp, camera transform matrix and tracking status).

After creation, start/stop can be invoked to start or stop video stream capture.

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

InertialCameraDevice 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

Default create method.

C

void easyar_InertialCameraDevice__ctor(easyar_InertialCameraDevice * * Return)

C++

InertialCameraDevice()

Java

public InertialCameraDevice()

Kotlin

constructor()

Objective-C

+ (easyar_InertialCameraDevice *) create

Swift

public convenience init()

C#

public InertialCameraDevice()

isAvailable

Checks if the component is available. It returns true only on Android 7.0 (API Level 24+) when accelerometer, gyroscope and attitude sensor are all available.

C

bool easyar_InertialCameraDevice_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_InertialCameraDevice_bufferCapacity(const easyar_InertialCameraDevice * 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_InertialCameraDevice_setBufferCapacity(easyar_InertialCameraDevice * 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_InertialCameraDevice_inputFrameSource(easyar_InertialCameraDevice * 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.

C

void easyar_InertialCameraDevice_setFocusMode(easyar_InertialCameraDevice * This, easyar_InertialCameraDeviceFocusMode focusMode)

C++

void setFocusMode(InertialCameraDeviceFocusMode focusMode)

Java

public void setFocusMode(int focusMode)

Kotlin

fun setFocusMode(focusMode: Int): Unit

Objective-C

- (void)setFocusMode:(easyar_InertialCameraDeviceFocusMode)focusMode

Swift

public func setFocusMode(_ focusMode: InertialCameraDeviceFocusMode) -> Void

C#

public virtual void setFocusMode(InertialCameraDeviceFocusMode focusMode)

type

Camera type. Call after a successful open.

C

easyar_CameraDeviceType easyar_InertialCameraDevice_type(const easyar_InertialCameraDevice * 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. Call after a successful open.

C

int easyar_InertialCameraDevice_cameraOrientation(const easyar_InertialCameraDevice * 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()

size

Gets the current preview size. Call after a successful open.

C

easyar_Vec2I easyar_InertialCameraDevice_size(const easyar_InertialCameraDevice * 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()

supportedSizeCount

Gets the number of supported preview sizes. Call after a successful open.

C

int easyar_InertialCameraDevice_supportedSizeCount(const easyar_InertialCameraDevice * This)

C++

int supportedSizeCount()

Java

public int supportedSizeCount()

Kotlin

fun supportedSizeCount(): Int

Objective-C

- (int)supportedSizeCount

Swift

public func supportedSizeCount() -> Int32

C#

public virtual int supportedSizeCount()

supportedSize

Gets the index-th supported preview size. It returns {0, 0} if index is out of range. Call after a successful open.

C

easyar_Vec2I easyar_InertialCameraDevice_supportedSize(const easyar_InertialCameraDevice * This, int index)

C++

Vec2I supportedSize(int index)

Java

public @Nonnull Vec2I supportedSize(int index)

Kotlin

fun supportedSize(index: Int): Vec2I

Objective-C

- (easyar_Vec2I *)supportedSize:(int)index

Swift

public func supportedSize(_ index: Int32) -> Vec2I

C#

public virtual Vec2I supportedSize(int index)

setSize

Sets the preview size. The available nearest value will be selected. Call size to get the actual size. Call after a successful open. frameRateRange may change after calling setSize.

C

bool easyar_InertialCameraDevice_setSize(easyar_InertialCameraDevice * This, easyar_Vec2I size)

C++

bool setSize(Vec2I size)

Java

public boolean setSize(@Nonnull Vec2I size)

Kotlin

fun setSize(size: Vec2I): Boolean

Objective-C

- (bool)setSize:(easyar_Vec2I *)size

Swift

public func setSize(_ size: Vec2I) -> Bool

C#

public virtual bool setSize(Vec2I size)

open

Opens back camera of device. If the opening fails will return false.

C

bool easyar_InertialCameraDevice_open(easyar_InertialCameraDevice * This)

C++

bool open()

Java

public boolean open()

Kotlin

fun open(): Boolean

Objective-C

- (bool)open

Swift

public func `open`() -> Bool

C#

public virtual bool open()

start

Starts video stream capture.

C

bool easyar_InertialCameraDevice_start(easyar_InertialCameraDevice * 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_InertialCameraDevice_stop(easyar_InertialCameraDevice * 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()

reset

Resets states.

C

void easyar_InertialCameraDevice_reset(easyar_InertialCameraDevice * This)

C++

void reset()

Java

public void reset()

Kotlin

fun reset(): Unit

Objective-C

- (void)reset

Swift

public func reset() -> Void

C#

public virtual void reset()

close

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

C

void easyar_InertialCameraDevice_close(easyar_InertialCameraDevice * 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()

frameRateRangeLower

Gets lower bound of current frame rate range. Call after a successful open.

C

double easyar_InertialCameraDevice_frameRateRangeLower(const easyar_InertialCameraDevice * 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. Call after a successful open.

C

double easyar_InertialCameraDevice_frameRateRangeUpper(const easyar_InertialCameraDevice * 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()