Common Definitions

Shared types and constants.

Summary

Enumerations

ArStatus{
  AR_SUCCESS = 0,
  AR_ERROR_INVALID_ARGUMENT = -1,
  AR_ERROR_FATAL = -2,
  AR_ERROR_SESSION_PAUSED = -3,
  AR_ERROR_SESSION_NOT_PAUSED = -4,
  AR_ERROR_NOT_TRACKING = -5,
  AR_ERROR_TEXTURE_NOT_SET = -6,
  AR_ERROR_MISSING_GL_CONTEXT = -7,
  AR_ERROR_UNSUPPORTED_CONFIGURATION = -8,
  AR_ERROR_CAMERA_PERMISSION_NOT_GRANTED = -9,
  AR_ERROR_DEADLINE_EXCEEDED = -10,
  AR_ERROR_RESOURCE_EXHAUSTED = -11,
  AR_ERROR_NOT_YET_AVAILABLE = -12,
  AR_ERROR_CAMERA_NOT_AVAILABLE = -13,
  AR_ERROR_CLOUD_ANCHORS_NOT_CONFIGURED = -14,
  AR_ERROR_INTERNET_PERMISSION_NOT_GRANTED = -15,
  AR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_HOSTING = -16,
  AR_ERROR_IMAGE_INSUFFICIENT_QUALITY = -17,
  AR_ERROR_DATA_INVALID_FORMAT = -18,
  AR_ERROR_DATA_UNSUPPORTED_VERSION = -19,
  AR_ERROR_ILLEGAL_STATE = -20,
  AR_UNAVAILABLE_ARCORE_NOT_INSTALLED = -100,
  AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE = -101,
  AR_UNAVAILABLE_APK_TOO_OLD = -103,
  AR_UNAVAILABLE_SDK_TOO_OLD = -104,
  AR_UNAVAILABLE_USER_DECLINED_INSTALLATION = -105
}
enum
Return code indicating success or failure of a method.
ArTrackingFailureReason{
  AR_TRACKING_FAILURE_REASON_NONE = 0,
  AR_TRACKING_FAILURE_REASON_BAD_STATE = 1,
  AR_TRACKING_FAILURE_REASON_INSUFFICIENT_LIGHT = 2,
  AR_TRACKING_FAILURE_REASON_EXCESSIVE_MOTION = 3,
  AR_TRACKING_FAILURE_REASON_INSUFFICIENT_FEATURES = 4
}
enum
Describes possible tracking failure reasons of a ArCamera.
ArTrackingState{
  AR_TRACKING_STATE_TRACKING = 0,
  AR_TRACKING_STATE_PAUSED = 1,
  AR_TRACKING_STATE_STOPPED = 2
}
enum
Describes the tracking state of a Trackable, an ArAnchor or the ArCamera.

Enumerations

ArStatus

 ArStatus

Return code indicating success or failure of a method.

Properties
AR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_HOSTING

HostCloudAnchor() failed because the anchor is not a type of anchor that is currently supported for hosting.

AR_ERROR_CAMERA_NOT_AVAILABLE

The Android camera has been reallocated to a higher priority application or is otherwise unavailable.

AR_ERROR_CAMERA_PERMISSION_NOT_GRANTED

The Android camera permission was not granted prior to calling ArSession_resume().

AR_ERROR_CLOUD_ANCHORS_NOT_CONFIGURED

The host/resolve function call failed because the Session is not configured for Cloud Anchors.

AR_ERROR_DATA_INVALID_FORMAT

The data passed in for this operation was not in a valid format.

AR_ERROR_DATA_UNSUPPORTED_VERSION

The data passed in for this operation is not supported by this version of the SDK.

AR_ERROR_DEADLINE_EXCEEDED

Acquire failed because the object being acquired was already released.

For example, this happens if the application holds an ArFrame beyond the next call to ArSession_update(), and then tries to acquire its Point Cloud.

AR_ERROR_FATAL

An internal error occurred that the application should not attempt to recover from.

AR_ERROR_ILLEGAL_STATE

A function has been invoked at an illegal or inappropriate time.

A message will be printed to logcat with additional details for the developer. For example, ArSession_resume() will return this status if the camera configuration was changed and there are any unreleased images.

AR_ERROR_IMAGE_INSUFFICIENT_QUALITY

Attempted to add an image with insufficient quality (e.g., too few features) to the image database.

AR_ERROR_INTERNET_PERMISSION_NOT_GRANTED

ArSession_configure() failed because the specified configuration required the Android INTERNET permission, which the application did not have.

AR_ERROR_INVALID_ARGUMENT

One of the arguments was invalid; either null or not appropriate for the operation requested.

AR_ERROR_MISSING_GL_CONTEXT

An operation required GL context but one was not available.

AR_ERROR_NOT_TRACKING

An operation was attempted that the session be in the TRACKING state, but the session was not.

AR_ERROR_NOT_YET_AVAILABLE

Acquire failed because the data isn't available yet for the current frame.

For example, acquiring image metadata may fail with this error because the camera hasn't fully started.

AR_ERROR_RESOURCE_EXHAUSTED

There are no available resources to complete the operation.

In cases of acquire methods returning this error, this can be avoided by releasing previously acquired objects before acquiring new ones.

AR_ERROR_SESSION_NOT_PAUSED

An operation was attempted that requires the session be paused, but the session was running.

AR_ERROR_SESSION_PAUSED

An operation was attempted that requires the session be running, but the session was paused.

AR_ERROR_TEXTURE_NOT_SET

A texture name was not set by calling ArSession_setCameraTextureName() before the first call to ArSession_update().

AR_ERROR_UNSUPPORTED_CONFIGURATION

The configuration supplied to ArSession_configure() is unsupported.

To avoid this error, ensure that Session_checkSupported() returns true.

AR_SUCCESS

The operation was successful.

AR_UNAVAILABLE_APK_TOO_OLD

The ARCore APK currently installed on device is too old and needs to be updated.

AR_UNAVAILABLE_ARCORE_NOT_INSTALLED

The ARCore APK is not installed on this device.

AR_UNAVAILABLE_DEVICE_NOT_COMPATIBLE

The device is not currently compatible with ARCore.

AR_UNAVAILABLE_SDK_TOO_OLD

The ARCore APK currently installed no longer supports the ARCore SDK that the application was built with.

AR_UNAVAILABLE_USER_DECLINED_INSTALLATION

The user declined installation of the ARCore APK during this run of the application and the current request was not marked as user-initiated.

ArTrackingFailureReason

 ArTrackingFailureReason

Describes possible tracking failure reasons of a ArCamera.

Properties
AR_TRACKING_FAILURE_REASON_BAD_STATE

Motion tracking lost due to bad internal state.

No specific user action is likely to resolve this issue.

AR_TRACKING_FAILURE_REASON_EXCESSIVE_MOTION

Motion tracking lost due to excessive motion.

Ask the user to move the device more slowly.

AR_TRACKING_FAILURE_REASON_INSUFFICIENT_FEATURES

Motion tracking lost due to insufficient visual features.

Ask the user to move to a different area and to avoid blank walls and surfaces without detail.

AR_TRACKING_FAILURE_REASON_INSUFFICIENT_LIGHT

Motion tracking lost due to poor lighting conditions.

Ask the user to move to a more brightly lit area.

AR_TRACKING_FAILURE_REASON_NONE

Indicates expected motion tracking behavior.

Always returned when ArCamera_getTrackingState() is AR_TRACKING_STATE_TRACKING. When ArCamera_getTrackingState() is AR_TRACKING_STATE_PAUSED, indicates that the session is initializing normally.

ArTrackingState

 ArTrackingState

Describes the tracking state of a Trackable, an ArAnchor or the ArCamera.

Properties
AR_TRACKING_STATE_PAUSED

ARCore has paused tracking this object, but may resume tracking it in the future.

This can happen if device tracking is lost, if the user enters a new space, or if the Session is currently paused. When in this state, the positional properties of the object may be wildly inaccurate and should not be used.

AR_TRACKING_STATE_STOPPED

ARCore has stopped tracking this Trackable and will never resume tracking it.

AR_TRACKING_STATE_TRACKING

The object is currently tracked and its pose is current.

フィードバックを送信...