Table of Contents

Class ARFoundationFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

ConnectstheoutputofARFoundationinthescenetoEasyAR'scustomframesourceinput.ProvidesARFoundationsupportviaEasyARSense'scustomcameracapability.

Thisframesourceisamotion-trackingdeviceandoutputsmotiondatain.

To usethisframesource,``ARFoundation``isrequired.YouneedtoconfigureARFoundationaccordingtotheofficialdocumentation.

public abstract class ARFoundationFrameSource : FrameSource
Inheritance
ARFoundationFrameSource
Derived

Properties

AvailableCenterMode

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Allavailablecenteringmodes.

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

Property Value

Camera

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Ondesktopdevicesormobiles,thiscamerarepresentsthecorrespondingtothephysicalcameradeviceinthevirtualworld.ItsprojectionmatrixandpositioncorrespondtotherealdeviceandarecontrolledbyEasyAR.Onhead-mounteddisplays,thiscameraisonlyusedtodisplaydiagnostictextinfrontoftheeyesandisnotusedforrendering.ThecameraisalsonotcontrolledbyEasyAR.

protected override Camera Camera { get; }

Property Value

CameraFrameStarted

Providedonlywhencreatinganewframesource.Itisaccessedthroughoutthelifetimeof.

Whethercameraframeinputhasstarted.

protected override bool CameraFrameStarted { get; }

Property Value

DeviceCameras

Providedonlywhencreatinganewframesource.Itisaccessedwhenistrue.

Thedevicecameraprovidingcameraframedata.Ifthecameraframedataisprovidedbymultiplecameras,allcamerasmustbeincludedinthelist.

Ensurethevalueiscorrectwhenistrue.

protected override List<FrameSourceCamera> DeviceCameras { get; }

Property Value

Display

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Providesdisplaysysteminformation.Youcanuseortoobtaindefaultdisplayinformation.

protected override IDisplay Display { get; }

Property Value

IsAvailable

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whetherthecurrentframesourceisavailable.

Ifthevalueequalsnull,willbecalled,andthevaluewillbeobtainedafterthecompletes.

protected override Optional<bool> IsAvailable { get; }

Property Value

IsCameraUnderControl

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whenthevalueistrue,thesessionupdatesthecamera'stransformandrenderscameraimages.

Whencreatingahead-mounteddisplay(HMD)extension,itshouldbefalse.Youshouldhavefullcontroloverthe3Dcamerainthescene.Youshouldhandlecamerarendering,especiallyinVSTmode.

protected override bool IsCameraUnderControl { get; }

Property Value

IsHMD

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Whetherthecurrentframesourceisahead-mounteddisplay.IfitisanHMD,diagnosticinformationwillbedisplayedona3Dboardinfrontofthecamera.

Someframefiltersoperatedifferentlyondevices.

protected override bool IsHMD { get; }

Property Value

Methods

CheckAvailability()

Providedonlywhencreatinganewframesource.Itisaccessedonlyduringtheprocess.

Ausedtocheckframesourceavailabilitywhenequalsnull.

protected override IEnumerator CheckAvailability()

Returns

OnSessionStart(ARSession)

Providedonlywhencreatinganewframesource.Itisaccessedonlyduring.

Handlessessionstartupifthisframesourcehasbeenassembledinto.Thismethodisdesignedfordelayedinitialization;youcanperformAR-specificinitializationworkhere.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Providedonlywhencreatinganewframesource.Itisaccessedduringorothersessionshutdown/corruptionprocesses.

Handlessessionshutdownifthisframesourcehasbeenassembledinto.Youcanusethismethodtodestroyresourcescreatedduringandsessionruntime,andtoresetinternalstate.Thismethodisguaranteedtobecalledbeforesessiondestruction.Iftheframesourceisdestroyedbeforethesession,thiswillnotbecalledandthesessionwillbecorrupted.

protected override void OnSessionStop()