Table of Contents

Class ThreeDofCameraDevice

Namespace
easyar

ThreeDofCameraDevice implements a three dof camera device and outputs InputFrame whose CameraTransformType is ThreeDofRotOnly (including image, camera parameters, timestamp, pose transformation matrix, and tracking status). After creation, start/stop can be called to start and stop collecting video stream data. When the device is no longer needed, close can be called to close it. It should not be used after close. ThreeDofCameraDevice outputs InputFrame through inputFrameSource, and 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 the device and not released, the device will stop outputting new InputFrame until previous InputFrame are released. This may cause issues such as the image freezing.

ThreeDofCameraDevice

Constructors

ThreeDofCameraDevice

Default creation method.

void easyar_ThreeDofCameraDevice__ctor(easyar_ThreeDofCameraDevice * * Return)
ThreeDofCameraDevice()
public ThreeDofCameraDevice()
constructor()
+ (easyar_ThreeDofCameraDevice *) create
public convenience init()
public ThreeDofCameraDevice()

Methods

isAvailable

Checks whether it is available. Returns true only on Android or iOS when the gyroscope is available.

bool easyar_ThreeDofCameraDevice_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()

Returns

Type Description
Boolean

bufferCapacity

Capacity of the InputFrame buffer. The default value is 8.

int easyar_ThreeDofCameraDevice_bufferCapacity(const easyar_ThreeDofCameraDevice * This)
int bufferCapacity()
public int bufferCapacity()
fun bufferCapacity(): Int
- (int)bufferCapacity
public func bufferCapacity() -> Int32
public virtual int bufferCapacity()

Returns

Type Description
Int32

setBufferCapacity

Sets the capacity of the InputFrame buffer.

void easyar_ThreeDofCameraDevice_setBufferCapacity(easyar_ThreeDofCameraDevice * 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

Type Description
Void

inputFrameSource

InputFrame output port.

void easyar_ThreeDofCameraDevice_inputFrameSource(easyar_ThreeDofCameraDevice * 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

Type Description
InputFrameSource

setFocusMode

Sets the focus mode to focusMode. Call before start.

void easyar_ThreeDofCameraDevice_setFocusMode(easyar_ThreeDofCameraDevice * This, easyar_ThreeDofCameraDeviceFocusMode focusMode)
void setFocusMode(ThreeDofCameraDeviceFocusMode focusMode)
public void setFocusMode(int focusMode)
fun setFocusMode(focusMode: Int): Unit
- (void)setFocusMode:(easyar_ThreeDofCameraDeviceFocusMode)focusMode
public func setFocusMode(_ focusMode: ThreeDofCameraDeviceFocusMode) -> Void
public virtual void setFocusMode(ThreeDofCameraDeviceFocusMode focusMode)

Parameters

Name Type Description
focusMode ThreeDofCameraDeviceFocusMode

Returns

Type Description
Void

type

Camera type. Call after a successful open.

easyar_CameraDeviceType easyar_ThreeDofCameraDevice_type(const easyar_ThreeDofCameraDevice * This)
CameraDeviceType type()
public int type()
fun type(): Int
- (easyar_CameraDeviceType)type
public func type() -> CameraDeviceType
public virtual CameraDeviceType type()

Returns

Type Description
CameraDeviceType

cameraOrientation

Clockwise rotation angle required for displaying the camera image in the natural orientation of the device. Call after a successful open.

int easyar_ThreeDofCameraDevice_cameraOrientation(const easyar_ThreeDofCameraDevice * This)
int cameraOrientation()
public int cameraOrientation()
fun cameraOrientation(): Int
- (int)cameraOrientation
public func cameraOrientation() -> Int32
public virtual int cameraOrientation()

Returns

Type Description
Int32

size

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

easyar_Vec2I easyar_ThreeDofCameraDevice_size(const easyar_ThreeDofCameraDevice * This)
Vec2I size()
public @Nonnull Vec2I size()
fun size(): Vec2I
- (easyar_Vec2I *)size
public func size() -> Vec2I
public virtual Vec2I size()

Returns

Type Description
Vec2I

supportedSizeCount

Gets the number of all image sizes supported by the current device. Call after a successful open.

int easyar_ThreeDofCameraDevice_supportedSizeCount(const easyar_ThreeDofCameraDevice * This)
int supportedSizeCount()
public int supportedSizeCount()
fun supportedSizeCount(): Int
- (int)supportedSizeCount
public func supportedSizeCount() -> Int32
public virtual int supportedSizeCount()

Returns

Type Description
Int32

supportedSize

Gets the image size at index among all image sizes supported by the current device. Returns {0, 0} if index is out of range. Call after a successful open.

easyar_Vec2I easyar_ThreeDofCameraDevice_supportedSize(const easyar_ThreeDofCameraDevice * 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

Type Description
Vec2I

setSize

Sets the current image size. The available value closest to the set value will be used. size can be used to get the actual size. Call after a successful open. frameRateRange may change after setting size.

bool easyar_ThreeDofCameraDevice_setSize(easyar_ThreeDofCameraDevice * This, easyar_Vec2I size)
bool setSize(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

Type Description
Boolean

open

Opens the back camera of the device. Returns false if opening fails.

bool easyar_ThreeDofCameraDevice_open(easyar_ThreeDofCameraDevice * This)
bool open()
public boolean open()
fun open(): Boolean
- (bool)open
public func `open`() -> Bool
public virtual bool open()

Returns

Type Description
Boolean

start

Starts collecting video stream data.

bool easyar_ThreeDofCameraDevice_start(easyar_ThreeDofCameraDevice * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()

Returns

Type Description
Boolean

stop

Stops collecting video stream data.

void easyar_ThreeDofCameraDevice_stop(easyar_ThreeDofCameraDevice * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()

Returns

Type Description
Void

close

Closes. It should not be used after close.

void easyar_ThreeDofCameraDevice_close(easyar_ThreeDofCameraDevice * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()

Returns

Type Description
Void

frameRateRangeLower

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

double easyar_ThreeDofCameraDevice_frameRateRangeLower(const easyar_ThreeDofCameraDevice * This)
double frameRateRangeLower()
public double frameRateRangeLower()
fun frameRateRangeLower(): Double
- (double)frameRateRangeLower
public func frameRateRangeLower() -> Double
public virtual double frameRateRangeLower()

Returns

Type Description
Double

frameRateRangeUpper

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

double easyar_ThreeDofCameraDevice_frameRateRangeUpper(const easyar_ThreeDofCameraDevice * This)
double frameRateRangeUpper()
public double frameRateRangeUpper()
fun frameRateRangeUpper(): Double
- (double)frameRateRangeUpper
public func frameRateRangeUpper() -> Double
public virtual double frameRateRangeUpper()

Returns

Type Description
Double