MotionTrackerCameraDevice Class


MotionTrackerCameraDevice implements a camera device with metric-scale six degree-of-freedom motion tracking, which outputs InputFrame (including image, camera parameters, timestamp, 6DOF pose and tracking status).

After creation, start/stop can be invoked to start or stop data flow.

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

MotionTrackerCameraDevice outputs InputFrame from inputFrameSource. inputFrameSource shall be connected to InputFrameSink for further use. Refer to Overview _ .


Create MotionTrackerCameraDevice object.

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


Check if the devices supports motion tracking. Returns True if the device supports Motion Tracking, otherwise returns 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()


Set InputFrame buffer capacity.

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 higher than this number, the device will not output new InputFrame until previous InputFrame has been released. This may cause screen stuck. Refer to Overview _ .

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)


Get InputFrame buffer capacity. The default is 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()


InputFrame output port.

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 motion tracking or resume motion tracking after pause.

Notice: Calling start after pausing will trigger device relocalization. Tracking will resume when the relocalization process succeeds.

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


Pause motion tracking. Call start to trigger relocation, resume motion tracking if the relocation succeeds.

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 motion tracking. The component shall not be used after calling 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()