Class ExternalDeviceRotationFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Represents the frame source of an external device with 3DOF rotation tracking capability. Usually represents a head-mounted device where both camera rendering and device tracking are done by the device SDK.
This frame source is a 3DOF rotation tracking device that outputs rotation data in ARSession.
You can inherit it to implement head-mounted device and other device inputs, but you must complete the tracking function yourself. EasyAR's 3DOF rotation tracking cannot be directly used on external devices. You need to obtain image and rotation data from hardware or other places by yourself and input them to EasyAR. EasyAR does not provide the ability to obtain these data, but provides the ability to run EasyAR functions after inputting these data to EasyAR.
When using trial products (personal edition license, trial edition XR license or trial edition Mega service, etc.) on a custom camera or head-mounted device, EasyAR Sense will stop responding within a fixed limited time after each startup.
public abstract class ExternalDeviceRotationFrameSource : ExternalDeviceFrameSource
- Inheritance
-
ExternalDeviceRotationFrameSource
- Inherited Members
Methods
HandleCameraFrameData(DeviceFrameSourceCamera, double, Image, CameraParameters, Quaternion)
Input camera frame data.
It is recommended to input data at 30 or 60fps. The minimum acceptable frame rate is = 2, but some algorithm response times will be affected. It can be called in any thread, as long as your API is thread-safe. These data need to be consistent with the data when the camera sensor is exposed. As long as it can be obtained, it is recommended to input color data to EasyAR Sense, which is helpful for the effect of EasyAR Mega. For the best efficiency, you can design the entire data chain so that the original YUV data is directly passed through shared memory and directly input to EasyAR Sense using data pointers. Please note the data ownership.
protected bool HandleCameraFrameData(DeviceFrameSourceCamera deviceCamera, double timestamp, Image image, CameraParameters cameraParameters, Quaternion deviceRotation)
Parameters
deviceCameratimestampimagecameraParametersdeviceRotation
Returns
HandleRenderFrameData(double, Quaternion)
Input rendered frame data.
Please ensure that it is called per frame after the device data is ready and no frame skipping is allowed. These data need to be consistent with the current Unity rendering camera data in the same frame as the driver.
protected bool HandleRenderFrameData(double timestamp, Quaternion rotation)
Parameters
timestamprotation