public static final enum
Session.Feature
Fundamental session features that can be requested using Session.Session(Context, Set)
.
All currently defined features are mutually compatible.
Inherited Methods
class
java.lang.Enum
final
Object
|
clone()
|
final
int
|
compareTo(Session.Feature arg0)
|
int
|
compareTo(Object arg0)
|
final
Optional<EnumDesc<Session.Feature>>
|
describeConstable()
|
final
boolean
|
equals(Object arg0)
|
final
void
|
finalize()
|
final
Class<Session.Feature>
|
getDeclaringClass()
|
final
int
|
hashCode()
|
final
String
|
name()
|
final
int
|
ordinal()
|
String
|
toString()
|
static
<T extends Enum<T>>
T
|
class
java.lang.Object
interface
java.lang.constant.Constable
abstract
Optional<? extends ConstantDesc>
|
describeConstable()
|
interface
java.lang.Comparable
abstract
int
|
compareTo(Session.Feature arg0)
|
Enum Values
FRONT_CAMERA
public static final Session.Feature FRONT_CAMERA
This field was deprecated.
To create a session using the front-facing (selfie) camera, use Session.setCameraConfig(CameraConfig)
with the desired config retrieved from Session.getSupportedCameraConfigs(CameraConfigFilter)
.
Use the front-facing (selfie) camera. 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.
SHARED_CAMERA
public static final Session.Feature SHARED_CAMERA
Enable sharing the camera between ARCore and the app. See the class-level documentation for
SharedCamera
for an example of how to use this method.
Note:
- You must check that a compatible version of ARCore is installed before calling this
method. See the class-level documentation for
Session
for details. - You must wrap
CameraDevice.StateCallback
andCameraCaptureSession.StateCallback
callbacks usingSharedCamera.createARDeviceStateCallback(android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler)
andSharedCamera.createARSessionStateCallback(android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
respectively.
While ARCore is paused you can use the Camera2 APIs directly without restriction.
While ARCore is active, the app may continue to use Camera2 APIs, except it must not call
CameraCaptureSession#setRepeatingRequest
as this will interfere with ARCore
operation.