Table of Contents

Class ExternalDeviceRotationFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

A frame source representing an external device with 3DOF rotation tracking capability. It usually represents a head-mounted device, where camera rendering and device tracking are both completed by the device SDK.

This frame source is a 3DOF rotation tracking device and outputs rotation data in ARSession.

You can inherit from it to implement device input such as a headset, but you must implement tracking yourself. EasyAR 3DOF rotation tracking cannot be used directly on external devices. You need to obtain image and rotation data yourself from hardware or elsewhere and input them to EasyAR. EasyAR does not provide the ability to acquire this data, but does provide the ability to run EasyAR features after the data is input to EasyAR.

When trial products, such as a personal license, trial XR license, or trial Mega service, are used on a custom camera or headset, EasyAR Sense will stop responding for a fixed limited time after each startup.

public abstract class ExternalDeviceRotationFrameSource : ExternalDeviceFrameSource
Inheritance
ExternalDeviceRotationFrameSource
Inherited Members

Methods

HandleCameraFrameData(DeviceFrameSourceCamera, double, Image, CameraParameters, Quaternion)

Inputs camera frame data.

It is recommended to input data at 30 or 60 fps. The minimum acceptable frame rate is 2, but the response time of some algorithms will be affected. It can be called from any thread as long as your APIs are thread-safe. This data must be consistent with the data at the time of camera sensor exposure. Whenever available, it is recommended to input color data to EasyAR Sense, which helps the effect of EasyAR Mega. For best efficiency, you can design the entire data chain so that raw YUV data passes directly through shared memory and is passed to EasyAR Sense directly with a data pointer. Pay attention to data ownership.

protected bool HandleCameraFrameData(DeviceFrameSourceCamera deviceCamera, double timestamp, Image image, CameraParameters cameraParameters, Quaternion deviceRotation)

Parameters

deviceCamera
timestamp
image
cameraParameters
deviceRotation

HandleRenderFrameData(double, Quaternion)

Inputs rendering frame data.

Make sure to call it every frame after device data is ready. Frames cannot be skipped. This data must be consistent with the data of the current Unity rendering camera in the same frame driven by the device.

protected bool HandleRenderFrameData(double timestamp, Quaternion rotation)

Parameters

timestamp
rotation