ARSession Class

Description

MonoBehaviour which controls AR session in the scene. One session contains a set of components assembled as ARAssembly and controls data flow in the whole life cycle. This class is the entrance of AR, it is possible to create a new session class and replace this one in the scene to implement fully different AR workflow.


Enums

public enum ARSession.ARCenterMode

AR center mode.

public enum ARSession.ARHorizontalFlipMode

Horizontal flip rendering mode.


MonoBehaviour Messages

private void Start()

private void Update()

private void OnDestroy()


Fields

CenterMode

C#

public ARSession.ARCenterMode CenterMode

AR center mode. Modify at any time and takes effect immediately.

CenterTarget

C#

public TargetController CenterTarget

AR center Target when ARSession.CenterMode == ARSession.ARCenterMode.FirstTarget or ARSession.CenterMode == ARSession.ARCenterMode.SpecificTarget . Modify at any time and takes effect immediately.

WorldRootController

C#

public WorldRootController WorldRootController

AR center ARSession.WorldRootController when ARSession.CenterMode == ARSession.ARCenterMode.WorldRoot . Modify at any time and takes effect immediately.

HorizontalFlipNormal

C#

public ARSession.ARHorizontalFlipMode HorizontalFlipNormal

Horizontal flip rendering mode for normal camera. Modify at any time and takes effect immediately.

HorizontalFlipFront

C#

public ARSession.ARHorizontalFlipMode HorizontalFlipFront

Horizontal flip rendering mode for front camera. Modify at any time and takes effect immediately.

AssembleMode

C#

public ARAssembly.AssembleMode AssembleMode

Assemble mode used in ARAssembly.Assemble .

Assembly

C#

public ARAssembly Assembly

Assembly of AR components.


Properties

FrameCameraParameters

C#

public Optional< CameraParameters > FrameCameraParameters { get; }

CameraParameters from current frame.


Delegates

FrameChangeAction

C#

public delegate void FrameChangeAction( OutputFrame outputFrame, Matrix4x4 displayCompensation)

Output frame change event delegate.


Events

FrameChange

C#

public event ARSession.FrameChangeAction FrameChange

Output frame change event. It is triggered when the data itself changes, the frequency is affected by FrameSource data change (like CameraDevice FPS).

FrameUpdate

C#

public event Action< OutputFrame > FrameUpdate

Output frame update event. It has the same frequency as MonoBehaviour Update.

WorldRootChanged

C#

public event Action< WorldRootController > WorldRootChanged

ARSession.WorldRootController change event


Methods

ImageCoordinatesFromScreenCoordinates

C#

public Optional< Vector2 > ImageCoordinatesFromScreenCoordinates( Vector2 pointInView)

Transforms points from screen coordinate system ([0, 1]^2) to image coordinate system ([0, 1]^2). pointInView should be normalized to [0, 1]^2.