Table of Contents

Class ThreeDofCameraDevice

名前空間
easyar

ThreeDofCameraDevice は three dof の camera デバイスを実装し、CameraTransformType が ThreeDofRotOnly の InputFrame(画像、カメラパラメータ、タイムスタンプ、姿勢変換行列、トラッキング状態を含む)を出力します。 作成後、start/stop を呼び出して video stream データの収集を開始および停止できます。 このデバイスが不要になった場合は、close を呼び出して閉じることができます。close 後は使用しないでください。 ThreeDofCameraDevice は inputFrameSource を通して InputFrame を出力するため、inputFrameSource を InputFrameSink に接続して使用する必要があります。 bufferCapacity は InputFrame バッファの容量を表します。この数を超える InputFrame がデバイスから出力され、解放されていない場合、以前の InputFrame が解放されるまで、このデバイスは新しい InputFrame を出力しません。これにより画像が固まるなどの問題が発生する可能性があります。

ThreeDofCameraDevice

コンストラクター

ThreeDofCameraDevice

デフォルトの作成メソッドです。

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

メソッド

isAvailable

利用可能かどうかを確認します。Android または iOS 上で gyroscope が利用可能な場合にのみ true を返します。

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()

戻り値

説明
Boolean

bufferCapacity

InputFrame バッファの容量です。デフォルト値は 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()

戻り値

説明
Int32

setBufferCapacity

InputFrame バッファの容量を設定します。

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)

パラメーター

名前 説明
capacity Int32

戻り値

説明
Void

inputFrameSource

InputFrame 出力ポートです。

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()

戻り値

説明
InputFrameSource

setFocusMode

フォーカスモードを focusMode に設定します。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)

パラメーター

名前 説明
focusMode ThreeDofCameraDeviceFocusMode

戻り値

説明
Void

type

camera タイプです。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()

戻り値

説明
CameraDeviceType

cameraOrientation

camera 画像をデバイスの自然方向で表示するために必要な時計回りの回転角度です。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()

戻り値

説明
Int32

size

現在の image サイズを取得します。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()

戻り値

説明
Vec2I

supportedSizeCount

現在のデバイスがサポートするすべての image サイズの数を取得します。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()

戻り値

説明
Int32

supportedSize

現在のデバイスがサポートするすべての image サイズのうち、index 番目の image サイズを取得します。index が範囲外の場合は {0, 0} を返します。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)

パラメーター

名前 説明
index Int32

戻り値

説明
Vec2I

setSize

現在の image サイズを設定します。設定値に最も近い利用可能な値が使用されます。実際のサイズは size で取得できます。open 成功後に呼び出します。size を設定した後、frameRateRange が変化する可能性があります。

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)

パラメーター

名前 説明
size Vec2I

戻り値

説明
Boolean

open

デバイスの背面 camera を開きます。open に失敗した場合は false を返します。

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()

戻り値

説明
Boolean

start

video stream データの収集を開始します。

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()

戻り値

説明
Boolean

stop

video stream データの収集を停止します。

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()

戻り値

説明
Void

close

閉じます。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()

戻り値

説明
Void

frameRateRangeLower

現在の frame rate 範囲の下限を取得します。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()

戻り値

説明
Double

frameRateRangeUpper

現在の frame rate 範囲の上限を取得します。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()

戻り値

説明
Double