# Class ARSessionOptions

java.lang.Object
com.codename1.ar.ARSessionOptions

public final class ARSessionOptions extends Object

Configuration for an `ARSession`. Fluent builder.

The defaults open a world tracking session that detects horizontal planes and estimates lighting, which suits the common place-content-on-a-surface use case.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ARSessionOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ARPlaneDetection`
  `getPlaneDetection()`
  Which surface orientations the session detects.
  `ARReferenceImage[]`
  `getReferenceImages()`
  The registered reference images as a newly allocated array.
  `ARTrackingMode`
  `getTrackingMode()`
  The tracking configuration to run.
  `boolean`
  `isLightEstimation()`
  True when the session estimates real-world lighting.
  `ARSessionOptions`
  `lightEstimation(boolean on)`
  Whether to estimate real-world lighting.
  `ARSessionOptions`
  `planeDetection(ARPlaneDetection detection)`
  Which surface orientations to detect.
  `ARSessionOptions`
  `referenceImages(ARReferenceImage[] images)`
  Reference images the session should detect.
  `ARSessionOptions`
  `trackingMode(ARTrackingMode mode)`
  The tracking configuration to run.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ARSessionOptions

    public ARSessionOptions()

- ## Method Details

  - ### trackingMode

    public ARSessionOptions trackingMode(ARTrackingMode mode)
    The tracking configuration to run. Default `ARTrackingMode#WORLD`.

  - ### planeDetection

    public ARSessionOptions planeDetection(ARPlaneDetection detection)
    Which surface orientations to detect. Default `ARPlaneDetection#HORIZONTAL`. Ignored in face tracking sessions.

  - ### lightEstimation

    public ARSessionOptions lightEstimation(boolean on)
    Whether to estimate real-world lighting. Default true.

  - ### referenceImages

    public ARSessionOptions referenceImages(ARReferenceImage[] images)
    Reference images the session should detect. When any are registered, detected images are delivered as `ARImageAnchor`s through the anchor listener. Default none.

  - ### getTrackingMode

    public ARTrackingMode getTrackingMode()
    The tracking configuration to run.

  - ### getPlaneDetection

    public ARPlaneDetection getPlaneDetection()
    Which surface orientations the session detects.

  - ### isLightEstimation

    public boolean isLightEstimation()
    True when the session estimates real-world lighting.

  - ### getReferenceImages

    public ARReferenceImage[] getReferenceImages()
    The registered reference images as a newly allocated array.