Class XREALFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
AMonoBehaviourthatcontrolsXREALcameradevices(
Thisframesourceisamotiontrackingdevicethatoutputsmotiondatain
Whenusingtrialproducts(personaleditionlicense,trialeditionXRlicense,ortrialeditionMegaservice,etc.)oncustomcamerasorheadsets,EasyARSensewillstoprespondingafterafixedlimitedtimeaftereachstartup.
public class XREALFrameSource : FrameSource
- Inheritance
-
XREALFrameSource
Properties
AvailableCenterMode
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Allcentermodesthatcanbeused.
protected override IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }
Camera
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Ondesktopdevicesorphones,thiscameracorrespondstothe
protected override Camera Camera { get; }
CameraFrameStarted
Providedonlywhencreatinganewframesource.Itisaccessedthroughouttheentirelifecycleof
Whetherthecameraframehasstartedinput.
protected override bool CameraFrameStarted { get; }
DeviceCameras
Providedonlywhencreatinganewframesource.Itisaccessedwhen
Thedevicecamerathatprovidesthecameraframedata.Ifthecameraframedataisprovidedbymultiplecameras,thelistshouldincludeallofthem.
Ensurethatthevalueiscorrectwhen
protected override List<FrameSourceCamera> DeviceCameras { get; }
Display
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Providesdisplaysysteminformation.Youcanuse
protected override IDisplay Display { get; }
FrameRate
Frameraterange.Onlyavailablewhen
public double FrameRate { get; }
IsAvailable
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whetherthecurrentframesourceisavailable.
Ifthevalueisnull,
protected override Optional<bool> IsAvailable { get; }
IsCameraUnderControl
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whenthevalueistrue,thesessionwillupdatethecamera'stransformandrenderthecameraimage.
Whencreatingaheadsetextension,itshouldbefalse.Youshouldhavefullcontroloverthe3Dcamerainthescene.Youshouldhandlecamerarendering,especiallyinVSTmode.
protected override bool IsCameraUnderControl { get; }
IsHMD
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whetherthecurrentframesourceisaheadset.Ifitisaheadset,diagnosticinformationwillbedisplayedona3Dboardinfrontofthecamera.
Someframefiltersmayoperatedifferentlyonthedevice.
protected override bool IsHMD { get; }
Opened
Whetherthecameraisopen.
public bool Opened { get; }
ReceivedFrameCount
Thecountofframesacquired.Typicallyusedindebugging.Ifthisvaluestopsincreasing,itisusuallyahardwareissue;re-pluggingmayresolveit.
public int ReceivedFrameCount { get; }
Size
Currentimagesize.Onlyavailablewhen
public Vector2Int Size { get; }
enabled
Starts/stopscollectingvideostreamdataduring
public bool enabled { get; set; }
Methods
CheckAvailability()
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
A
protected override IEnumerator CheckAvailability()
Close()
Closethedevice.
public void Close()
OnSessionStart(ARSession)
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheStartSessionprocessof
Handlessessionstartupifthisframesourcehasbeenassembledinto
protected override void OnSessionStart(ARSession session)
Parameters
session
OnSessionStop()
Providedonlywhencreatinganewframesource.Itisaccessedduring
Handlessessionstopifthisframesourcehasbeenassembledinto
protected override void OnSessionStop()
Open()
Openthedevice.If
public void Open()
Events
DeviceClosed
Theeventfordeviceclosing.
public event Action DeviceClosed
DeviceOpened
Theeventfordeviceopening,whereabooleanvalueindicateswhetheritwassuccessful.
public event Action<bool, PermissionStatus, string> DeviceOpened