Table of Contents

Class ARFoundationFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

ConnectstheoutputofARFoundationinascenetoEasyAR'sinputviaacustomframesource.ProvidesARFoundationsupportthroughEasyARSense'scustomcameracapability.

Thisframesourceisamotion-trackingdevicethatoutputsmotiondatain.

Tousethisframesource,``ARFoundation``isrequired.YouneedtoconfigureARFoundationaccordingtotheofficialdocumentation.

public abstract class ARFoundationFrameSource : FrameSource
Inheritance
ARFoundationFrameSource
Derived

Properties

AvailableCenterMode

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Allavailabletracking-centermodes.

protected override IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }

Camera

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Ondesktopormobiledevices,thiscamerarepresentstheinthevirtualworldcorrespondingtothephysicalcameradeviceintherealworld.Itsprojectionmatrixandpositionwillcorrespondtothephysicalcamera,controlledbyEasyAR.Onahead-mounteddisplay,thiscameraisonlyusedtodisplaydiagnostictextinfrontoftheeyes,notforrenderingthescene,andthecameraisnotcontrolledbyEasyAR.

protected override Camera Camera { get; }

CameraFrameStarted

Providedonlywhencreatinganewframesource.Itisaccessedthroughoutthelifetimeofthe.

Whethercameraframeinputhasstarted.

protected override bool CameraFrameStarted { get; }

DeviceCameras

Providedonlywhencreatinganewframesource.Itisaccessedwhenistrue.

Providesdevicecamerasthatdelivercameraframedata.Ifcameraframedataisprovidedbymultiplecameras,thelistshouldincludeallofthem.

Ensurethevalueiscorrectwhenistrue.

protected override List<FrameSourceCamera> DeviceCameras { get; }

Display

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Providesthesystemdisplayinformation.Youcanuseortogetthedefaultdisplayinformation.

protected override IDisplay Display { get; }

IsAvailable

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whetherthecurrentframesourceisavailable.

Ifthevalueequalsnull,willbecalled,andthevaluewillbeobtainedafterthecompletes.

protected override Optional<bool> IsAvailable { get; }

IsCameraUnderControl

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whenthevalueistrue,thesessionupdatesthecamera'stransformandrenderscameraimages.

Whencreatingahead-mounted-displayextension,itshouldbefalse.Youshouldhavefullcontroloverthe3Dcamerainthescene.Youshouldhandlecamerarendering,especiallyinvideo-see-throughmode.

protected override bool IsCameraUnderControl { get; }

IsHMD

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whetherthecurrentframesourceisahead-mounteddisplay.Ifitisahead-mounteddisplay,diagnosticinformationwillbedisplayedona3Dboardinfrontofthecamera.

Someframefiltersmayoperatedifferentlyonadevice.

protected override bool IsHMD { get; }

enabled

runtimecontrolsstarting/stoppingimagestreamdatasendingtoEasyAR.Aftersessionstart,sendingonlybeginswhen.enabledistrue.

public bool enabled { get; set; }

Methods

CheckAvailability()

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

equalsnull,usedtocheckiftheframesourceisavailablevia.

protected override IEnumerator CheckAvailability()

OnSessionStart(ARSession)

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Handlessessionstartupifthisframesourceisalreadyassembledinto.Thismethodisdesignedfordelayedinitialization;youcanperformAR-specificinitializationtaskshere.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Providedonlywhencreatinganewframesource.Itisaccessedduringorothersessionshutdown/corruptionprocesses.

Handlessessionshutdownifthisframesourceisalreadyassembledinto.Youcanusethismethodtodestroyresourcescreatedinandduringthesession'soperation,andtorestoreinternalstate.Thismethodisguaranteedtobecalledbeforesessiondestruction.Iftheframesourceisdestroyedbeforethesession,itwillnotbecalled,andthesessionwillbecorrupted.

protected override void OnSessionStop()