Table of Contents

Class AREngineFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

ConnectstheoutputoftheAREnginecameradevicetothecustomframesourceinputofEasyARinthescene.ProvidesHuaweiAREnginesupportthroughthecustomcameracapabilityofEasyARSense.

Thisframesourceisamotion-trackingdeviceandoutputsmotiondatain.

Thisframesourcedoesnotusethe``HuaweiAREngineUnitySDK``anddoesnotrequireitsaddition.

public class AREngineFrameSource : FrameSource
Inheritance
AREngineFrameSource
Inherited Members

Fields

DesiredFocusMode

Thedesiredfocus-mode,effectiveonlyifmodifiedbeforetheeventorOnEnable.

Note:Duetohardwareorsystemlimitations,thefocusswitchmaybeineffectiveonsomedevices.

public AREngineCameraDeviceFocusMode DesiredFocusMode

Field Value

Properties

Camera

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Ondesktopdevicesormobilephones,thiscamerarepresentsthecorrespondingtothephysicalcameradeviceinthevirtualworld.ItsprojectionmatrixandpositionwillcorrespondtotherealworldcameraandbecontrolledbyEasyAR.Onahead-mounteddisplay,thiscameraisonlyusedtodisplaydiagnostictextinfrontoftheeyes,notforrenderingthescene,andisnotcontrolledbyEasyAR.

protected override Camera Camera { get; }

Property Value

CameraCandidate

Analternativeto,effectiveonlywhenUnityXROriginisnotused.Ifnotset,Camera.mainwillbeused.

public Camera CameraCandidate { get; set; }

Property Value

CameraFrameStarted

Providedonlywhencreatinganewframesource.Itisaccessedthroughoutthelifetimeof.

Whethercameraframeinputhasstarted.

protected override bool CameraFrameStarted { get; }

Property Value

DeviceCameras

Providedonlywhencreatinganewframesource.Itisaccessedonlywhenistrue.

Providesthedevicecameradeliveringcameraframedata.Ifthecameraframedataisprovidedbymultiplecameras,allcamerasneedtobeincludedinthelist.

Ensurethevalueiscorrectwhenistrue.

protected override List<FrameSourceCamera> DeviceCameras { get; }

Property Value

Display

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Providesthesystemdisplayinformation.Youcanuseortogetthedefaultdisplay.

protected override IDisplay Display { get; }

Property Value

FrameRateRange

Theframeraterange.Availableonlywhenistrue.

public Vector2 FrameRateRange { get; }

Property Value

IsAvailable

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Whetherthecurrentframesourceisavailable.

Ifthevalueisnull,willbecalled,andthevaluewillbeobtainedafterthecompletes.

protected override Optional<bool> IsAvailable { get; }

Property Value

IsCameraUnderControl

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Whensettotrue,thesessionwillupdatethecamera'stransformandwillrenderthecameraimage.

Whencreatingahead-mounteddisplayextension,itshouldbefalse.Youshouldhavefullcontroloverthe3Dcamerainthescene.Youshouldhandlethecamerarendering,especiallyinVSTmode.

protected override bool IsCameraUnderControl { get; }

Property Value

IsHMD

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Whetherthecurrentframesourceisahead-mounteddisplay.Ifitis,diagnosticinformationwillbedisplayedona3Dboardinfrontofthecamera.

Someframefiltersmaybehavedifferentlywhenrunningondevices.

protected override bool IsHMD { get; }

Property Value

Opened

Whetherthecameraisopen.

public bool Opened { get; }

Property Value

Size

Thecurrentimagesize.Availableonlywhenistrue.

public Optional<Vector2Int> Size { get; }

Property Value

Methods

Close()

Closesthedevice.

public void Close()

OnSessionStart(ARSession)

Providedonlywhencreatinganewframesource.Itisonlyaccessedduringtheprocess.

Handlessessionstartup,ifthisframesourcehasbeenassembledinto.Thismethodisdesignedforlazyinitialization;youcanperformAR-specificinitializationworkhere.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Providedonlywhencreatinganewframesource.Itisaccessedduringorothersessionshutdown/corruptionprocesses.

Handlessessionshutdown,ifthisframesourcehasbeenassembledinto.Youcanusethismethodtodestroyresourcescreatedinandduringthesession'soperationandrestoreinternalstate.Thismethodisguaranteedtobecalledbeforethesessionisdestroyed.Iftheframesourceisdestroyedbeforethesession,itwillnotbecalled,andthesessionwillbecorrupted.

protected override void OnSessionStop()

Open()

Opensthedevice.Ifandarenotcalledmanually,willautomaticallyuponstartup.

public void Open()

Events

DeviceClosed

Thedeviceclosedevent.

public event Action DeviceClosed

Event Type

DeviceOpened

Thedeviceopenedevent,wheretheboolvalueindicateswhetheritwassuccessful.

public event Action<bool, PermissionStatus, string> DeviceOpened

Event Type