ThreeDofCameraDevice Class

Description

ThreeDofCameraDevice implements a three dof camera device, which outputs InputFrame (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.

ThreeDofCameraDevice 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, will outputs InputFrame which CameraTransformType is ThreeDofRotOnly.

C

void easyar_ThreeDofCameraDevice__ctor(easyar_ThreeDofCameraDevice * * Return)

C++

ThreeDofCameraDevice()

Java

public ThreeDofCameraDevice()

Kotlin

constructor()

Objective-C

+ (easyar_ThreeDofCameraDevice *) create

Swift

public convenience init()

C#

public ThreeDofCameraDevice()

isAvailable

Checks if the component is available. It returns true only on Android or IOS when the gyroscope is available.

C

bool easyar_ThreeDofCameraDevice_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_ThreeDofCameraDevice_bufferCapacity(const easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_setBufferCapacity(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_inputFrameSource(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_setFocusMode(easyar_ThreeDofCameraDevice * This, easyar_ThreeDofCameraDeviceFocusMode focusMode)

C++

void setFocusMode(ThreeDofCameraDeviceFocusMode focusMode)

Java

public void setFocusMode(int focusMode)

Kotlin

fun setFocusMode(focusMode: Int): Unit

Objective-C

- (void)setFocusMode:(easyar_ThreeDofCameraDeviceFocusMode)focusMode

Swift

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

C#

public virtual void setFocusMode(ThreeDofCameraDeviceFocusMode focusMode)

size

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

C

easyar_Vec2I easyar_ThreeDofCameraDevice_size(const easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_supportedSizeCount(const easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_supportedSize(const easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_setSize(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_open(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_start(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_stop(easyar_ThreeDofCameraDevice * 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_ThreeDofCameraDevice_close(easyar_ThreeDofCameraDevice * 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()