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 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 ARImageAnchors 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.