public static final enum
CameraConfig.FacingDirection
Describes the direction a camera looks relative to the device. Used by CameraConfig.getFacingDirection()
.
Inherited Methods
Enum Values
public static final CameraConfig.FacingDirection BACK
BACK
public static final CameraConfig.FacingDirection BACK
Back-facing (world) camera (away from the user).
Available on all ARCore supported devices.
When used as a camera filter, via CameraConfigFilter.setFacingDirection(CameraConfig.FacingDirection)
, filters for camera
configs that use a back-facing (world) camera.
public static final CameraConfig.FacingDirection FRONT
FRONT
public static final CameraConfig.FacingDirection FRONT
Front-facing (selfie) camera (toward the user).
See ARCore supported devices for available camera configs by device.
To limit distribution of your app to only devices that have a front-facing camera, use uses-feature
with android.hardware.camera
.
When used as a camera filter, via CameraConfigFilter.setFacingDirection(CameraConfig.FacingDirection)
, filters for camera
configs that use a front-facing (selfie) camera.
To create a session using the front-facing (selfie) camera, use Session.setCameraConfig(CameraConfig)
to set a front-facing (selfie) camera config retrieved
from Session.getSupportedCameraConfigs(CameraConfigFilter)
.
When the front camera is selected, ARCore's behavior changes in the following ways:
- The display will be mirrored. Specifically,
Camera.getProjectionMatrix(float[], int, float, float)
will include a horizontal flip in the generated projection matrix and APIs that reason about things in screen space such asFrame.transformCoordinates2d(Coordinates2d, float[], Coordinates2d, float[])
will mirror screen coordinates. Open GL apps should consider usingglFrontFace
to render mirrored assets without changing their winding direction. Camera.getTrackingState()
will always returnTrackingState.PAUSED
.- All forms of
Frame.hitTest()
will always return an empty list. Camera.getDisplayOrientedPose()
will always return an identity pose.Session.createAnchor(Pose)
will always throwNotTrackingException
.- Planes will never be detected.
Session.configure(Config)
will throw if the supplied configuration requests Cloud Anchors or Augmented Images.