VisionOSARKitCameraDevice Class¶
This type is an EasyAR Sense API in C#: VisionOSARKitCameraDevice . Some descriptions may not apply to Unity environment on this page.
Some parts of the Sense API may have already been wrapped into Unity components, and directly usages may not be necessary.
Description¶
VisionOSARKitCameraDevice implements a camera device based on VisionOS ARKit, which outputs InputFrame (including image, camera parameters, timestamp, 6DOF location, and tracking status).
After creation, start/stop can be invoked to start or stop data collection.
When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
VisionOSARKitCameraDevice outputs InputFrame from inputFrameSource. inputFrameSource shall be connected to InputFrameSink for use. Refer to Overview .
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 more than this number, the device will not output new InputFrame , until previous InputFrame have been released. This may cause screen stuck. Refer to Overview .
Methods¶
bufferCapacity¶
- C#
public virtual int bufferCapacity()
InputFrame buffer capacity. The default is 8.
setBufferCapacity¶
- C#
public virtual void setBufferCapacity(int capacity)
Sets InputFrame buffer capacity.
requestPermissions¶
- C#
public virtual void requestPermissions( CallbackScheduler callbackScheduler, Optional<Action< PermissionStatus , string>> permissionCallback)
Requests necessary permissions from VisionOS including [World Sensing] and [Camera Access]
inputFrameSource¶
- C#
public virtual InputFrameSource inputFrameSource()
InputFrame output port.
getMotionInputData¶
- C#
public virtual Optional< MotionInputData > getMotionInputData()
Get synchoronous motion input data.
start¶
- C#
public virtual bool start()
Starts video stream capture.
stop¶
- C#
public virtual void stop()
Stops video stream capture.
close¶
- C#
public virtual void close()
Close. The component shall not be used after calling close.
size¶
- C#
public virtual Vec2I size()
Gets the current preview size.
type¶
- C#
public virtual CameraDeviceType type()
Camera type.
cameraOrientation¶
- C#
public virtual int cameraOrientation()
Angles rotation required to rotate clockwise and display camera image on device with natural orientation.
frameRateRangeLower¶
- C#
public virtual double frameRateRangeLower()
Gets lower bound of current frame rate range.
frameRateRangeUpper¶
- C#
public virtual double frameRateRangeUpper()
Gets upper bound of current frame rate range.