MotionTrackerCameraDevice Class

Description

MotionTrackerCameraDevice实现了一个真实尺度6DOF运动追踪的camera设备,输出 InputFrame (包含图像、摄像机参数、时间戳、6DOF位置信息和跟踪状态)。

创建之后,可以调用start/stop来开始和停止数据流。

当不再需要该设备时,可以调用close对其进行关闭。close之后不应继续使用。

MotionTrackerCameraDevice通过inputFrameSource输出 InputFrame ,应将inputFrameSource连接到 InputFrameSink 上进行使用。参考 概览 _ 。

Constructor

创建MotionTrackerCameraDevice对象。

C: void easyar_MotionTrackerCameraDevice__ctor(easyar_MotionTrackerCameraDevice * * Return)
C++17: MotionTrackerCameraDevice()
Traditional C++: MotionTrackerCameraDevice()
Java: public MotionTrackerCameraDevice()
Kotlin: constructor()
Objective-C: + (easyar_MotionTrackerCameraDevice *) create
Swift: public convenience init()
C#: public MotionTrackerCameraDevice()

isAvailable

检查设备是否支持Motion Tracking. 当设备支持运动追踪功能时返回True,否则返回False。

C: bool easyar_MotionTrackerCameraDevice_isAvailable(void)
C++17: static bool isAvailable()
Traditional 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()

setBufferCapacity

设置 InputFrame 缓冲的容量。

bufferCapacity表示 InputFrame 缓冲的容量,如果有超过此数量的 InputFrame 从该设备中输出并且没有被释放,该设备将不再输出新的 InputFrame ,直到之前的 InputFrame 被释放。这可能造成画面卡住等问题。参考 概览 _ 。

C: void easyar_MotionTrackerCameraDevice_setBufferCapacity(easyar_MotionTrackerCameraDevice * This, int capacity)
C++17: void setBufferCapacity(int capacity)
Traditional 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)

bufferCapacity

获取 InputFrame 缓冲的容量,默认值为8。

C: int easyar_MotionTrackerCameraDevice_bufferCapacity(const easyar_MotionTrackerCameraDevice * This)
C++17: int bufferCapacity()
Traditional 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()

inputFrameSource

InputFrame 输出端口。

C: void easyar_MotionTrackerCameraDevice_inputFrameSource(easyar_MotionTrackerCameraDevice * This, easyar_InputFrameSource * * Return)
C++17: std::shared_ptr<InputFrameSource> inputFrameSource()
Traditional C++: void inputFrameSource(InputFrameSource * * Return)
Java: public @Nonnull InputFrameSource inputFrameSource()
Kotlin: fun inputFrameSource(): InputFrameSource
Objective-C: - (easyar_InputFrameSource *)inputFrameSource
Swift: public func inputFrameSource() -> InputFrameSource
C#: public virtual InputFrameSource inputFrameSource()

start

开始运动追踪,或者从暂停中触发重定位,成功后继续追踪。

注意:如果设备是调用stop暂停后再调用start追踪,会触发重定位,当重定位成功以后才会继续追踪。

C: bool easyar_MotionTrackerCameraDevice_start(easyar_MotionTrackerCameraDevice * This)
C++17: bool start()
Traditional 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

暂停运动追踪。调用start触发重定位,重定位成功后继续运动追踪。

C: void easyar_MotionTrackerCameraDevice_stop(easyar_MotionTrackerCameraDevice * This)
C++17: void stop()
Traditional 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之后不应继续使用。

C: void easyar_MotionTrackerCameraDevice_close(easyar_MotionTrackerCameraDevice * This)
C++17: void close()
Traditional 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()