Class ArSceneView
- java.lang.Object
-
- android.view.View
-
- android.view.ViewGroup
-
- android.widget.FrameLayout
-
- com.android.layoutlib.bridge.MockView
-
- android.view.SurfaceView
-
- com.google.ar.sceneform.SceneView
-
- com.google.ar.sceneform.ArSceneView
-
- All Implemented Interfaces:
android.graphics.drawable.Drawable.Callback,android.view.accessibility.AccessibilityEventSource,android.view.Choreographer.FrameCallback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent
public class ArSceneView extends SceneView
A SurfaceView that integrates with ARCore and renders a scene.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceArSceneView.OnSessionConfigChangeListenerCalled when the ARCore Session configuration has changed.-
Nested classes/interfaces inherited from class com.google.ar.sceneform.SceneView
SceneView.FrameRate
-
Nested classes/interfaces inherited from class android.widget.FrameLayout
android.widget.FrameLayout.LayoutParams
-
Nested classes/interfaces inherited from class android.view.ViewGroup
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
-
Nested classes/interfaces inherited from class android.view.View
android.view.View.AccessibilityDelegate, android.view.View.AutofillFlags, android.view.View.AutofillImportance, android.view.View.AutofillType, android.view.View.BaseSavedState, android.view.View.ContentCaptureImportance, android.view.View.DragShadowBuilder, android.view.View.DrawingCacheQuality, android.view.View.FindViewFlags, android.view.View.Focusable, android.view.View.FocusableMode, android.view.View.FocusDirection, android.view.View.FocusRealDirection, android.view.View.LayerType, android.view.View.LayoutDir, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListener, android.view.View.ResolvedLayoutDir, android.view.View.ScrollBarStyle, android.view.View.ScrollCaptureHint, android.view.View.ScrollIndicators, android.view.View.TextAlignment, android.view.View.ViewStructureType, android.view.View.Visibility
-
-
Field Summary
Fields Modifier and Type Field Description EnvironmentLightsEstimate_estimatedEnvironmentLightsLightEstimationConfig_lightEstimationConfigDon't use it.-
Fields inherited from class com.google.ar.sceneform.SceneView
_environment, _mainLight, DEFAULT_IBL_LOCATION, DEFAULT_SKYBOX_LOCATION
-
Fields inherited from class android.view.ViewGroup
FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_DEFAULT, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
-
Fields inherited from class android.view.View
ACCESSIBILITY_CURSOR_POSITION_UNDEFINED, ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DEBUG_DRAW, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_ACCESSIBILITY_NODE_PROVIDERS, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, IMPORTANT_FOR_CONTENT_CAPTURE_NO, IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_YES, IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAST_APP_AUTOFILL_ID, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_UNDEFINED, mAttributes, mCachingFailed, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, mPrivateFlags, mTransformationInfo, NAVIGATION_BAR_TRANSIENT, NAVIGATION_BAR_TRANSLUCENT, NAVIGATION_BAR_TRANSPARENT, NAVIGATION_BAR_UNHIDE, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PUBLIC_STATUS_BAR_VISIBILITY_MASK, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_CAPTURE_HINT_AUTO, SCROLL_CAPTURE_HINT_EXCLUDE, SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS, SCROLL_CAPTURE_HINT_INCLUDE, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, sDebugViewAttributes, sDebugViewAttributesApplicationPackage, SOUND_EFFECTS_ENABLED, STATUS_BAR_DISABLE_BACK, STATUS_BAR_DISABLE_CLOCK, STATUS_BAR_DISABLE_EXPAND, STATUS_BAR_DISABLE_HOME, STATUS_BAR_DISABLE_NOTIFICATION_ALERTS, STATUS_BAR_DISABLE_NOTIFICATION_ICONS, STATUS_BAR_DISABLE_NOTIFICATION_TICKER, STATUS_BAR_DISABLE_RECENT, STATUS_BAR_DISABLE_SEARCH, STATUS_BAR_DISABLE_SYSTEM_INFO, STATUS_BAR_HIDDEN, STATUS_BAR_TRANSIENT, STATUS_BAR_TRANSLUCENT, STATUS_BAR_TRANSPARENT, STATUS_BAR_UNHIDE, STATUS_BAR_VISIBLE, SYSTEM_UI_CLEARABLE_FLAGS, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, SYSTEM_UI_TRANSPARENT, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z
-
-
Constructor Summary
Constructors Constructor Description ArSceneView(android.content.Context context)Constructs a ArSceneView object and binds it to an Android Context.ArSceneView(android.content.Context context, android.util.AttributeSet attrs)Constructs a ArSceneView object and binds it to an Android Context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Required to exit Sceneform.voiddestroySession()Destroy the session without touching the scenevoiddoFrame(long frameTimeNanos)Callback that occurs for each display frame.java.util.Collection<com.google.ar.core.AugmentedImage>getAllAugmentedImages()Retrieve the view session tracked Augmented Images.java.util.Collection<com.google.ar.core.AugmentedImage>getAllAugmentedImages(com.google.ar.core.TrackingState trackingState, com.google.ar.core.AugmentedImage.TrackingMethod trackingMethod)Retrieve the view session tracked Augmented Images with the specified tracking state and method.java.util.Collection<com.google.ar.core.Plane>getAllPlanes()Retrieve the view session tracked planes.java.util.Collection<com.google.ar.core.Plane>getAllPlanes(com.google.ar.core.TrackingState... trackingStates)Retrieve the view session tracked planes with the specified tracking states.com.google.ar.core.FramegetArFrame()Returns the most recent ARCore Frame if it is available.CameraStreamgetCameraStream()Returns the CameraStream, used to control if the occlusion should be enabled or disabled.PlaneRenderergetPlaneRenderer()Returns PlaneRenderer, used to control plane visualization.com.google.ar.core.SessiongetSession()Returns the ARCore Session used by this view.com.google.ar.core.ConfiggetSessionConfig()The session config used by this View.java.util.Collection<com.google.ar.core.AugmentedImage>getUpdatedAugmentedImages()Retrieve the view last frame tracked Augmented Images.java.util.Collection<com.google.ar.core.AugmentedImage>getUpdatedAugmentedImages(com.google.ar.core.TrackingState trackingState, com.google.ar.core.AugmentedImage.TrackingMethod trackingMethod)Retrieve the view last frame tracked Augmented Images with the specified tracking state and method.java.util.Collection<com.google.ar.core.Plane>getUpdatedPlanes()Retrieve the view last frame tracked planes.java.util.Collection<com.google.ar.core.Plane>getUpdatedPlanes(com.google.ar.core.TrackingState... trackingStates)Retrieve the view last frame tracked planes with the specified tracking states.booleanhasTrackedAugmentedImage()Retrieve if the view has already tracked a Augmented Image.booleanhasTrackedPlane()Retrieve if the view has already tracked a plane.booleanisTrackingAugmentedImage()Retrieve if the view is currently tracking an Augmented Image.booleanisTrackingPlane()Retrieve if the view is currently tracking a plane.voidonLayout(boolean changed, int left, int top, int right, int bottom)voidpause()Pauses the rendering thread and ARCore session.java.util.concurrent.CompletableFuture<java.lang.Void>pauseAsync(java.util.concurrent.Executor executor)Non blocking call to pause the rendering thread and ARCore session.voidresume()Resumes the rendering thread and ARCore session.java.util.concurrent.CompletableFuture<java.lang.Void>resumeAsync(java.util.concurrent.Executor executor)Non blocking call to resume the rendering thread and ARCore session in the backgroundvoidsetCameraStreamRenderPriority(int priority)voidsetOnSessionConfigChangeListener(ArSceneView.OnSessionConfigChangeListener listener)Registers a callback to be invoked when the ARCore Session is to configured.voidsetSession(com.google.ar.core.Session session)Setup the view with an AR Session.voidsetSessionConfig(com.google.ar.core.Config config, boolean configureSession)Define the session config used by this View.-
Methods inherited from class com.google.ar.sceneform.SceneView
destroyAllResources, doFrameNoRepost, enableDebug, getRenderer, getScene, isDebugEnabled, onTouchEvent, reclaimReleasedResources, setBackground, setFrameRateFactor, setMaxFramesPerSeconds, setTransparent, startMirroringToSurface, stopMirroringToSurface
-
Methods inherited from class android.view.SurfaceView
gatherTransparentRegion, getHolder, setSecure, setZOrderMediaOverlay, setZOrderOnTop
-
Methods inherited from class com.android.layoutlib.bridge.MockView
addView, addView, addView, addView, addView, setGravity, setText
-
Methods inherited from class android.widget.FrameLayout
generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren, shouldDelayChildPressedState
-
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addTransientView, bringChildToFront, buildTouchDispatchChildList, captureTransitioningViews, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, createSnapshot, dispatchActivityResult, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEventInternal, dispatchProvideAutofillStructure, dispatchProvideContentCaptureStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findNamedViews, findViewByAccessibilityIdTraversal, findViewByAutofillIdTraversal, findViewsWithText, focusableViewAvailable, focusSearch, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildVisibleRect, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, getTransientView, getTransientViewCount, getTransientViewIndex, hasFocus, hasTransientState, hasWindowInsetsAnimationCallback, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isShowingContextMenuWithCoords, isTransitionGroup, jumpDrawablesToCurrentState, layout, makeFrameworkOptionalFitsSystemWindows, makeOptionalFitsSystemWindows, notifySubtreeAccessibilityStateChanged, notifySubtreeAccessibilityStateChangedIfNeeded, offsetChildrenTopAndBottom, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onDescendantUnbufferedRequested, onInitializeAccessibilityNodeInfoInternal, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onRequestSendAccessibilityEventInternal, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeTransientView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransitionStart, requestTransparentRegion, resetResolvedLayoutDirection, resetResolvedPadding, resetResolvedTextAlignment, resetResolvedTextDirection, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveTextAlignment, resolveTextDirection, restoreDefaultFocus, restoreFocusInCluster, restoreFocusNotInCluster, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, subtractObscuredTouchableRegion, suppressLayout, transformPointToViewLocal, updateViewLayout
-
Methods inherited from class android.view.View
addFocusables, addFrameMetricsListener, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, applyDrawableToTransparentRegion, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canHaveDisplayList, canNotifyAutofillEnterExitEvent, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAccessibilityFocus, clearAnimation, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createAccessibilityNodeInfoInternal, createContextMenu, createScrollCaptureCallbackInternal, debug, destroyDrawingCache, dispatchGenericMotionEvent, dispatchInitialProvideContentCaptureStructure, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerEvent, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, encode, findViewById, findViewByPredicate, findViewByPredicateInsideOut, findViewWithTag, finishMovingTask, fitsSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilitySelectionEnd, getAccessibilitySelectionStart, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAccessibilityViewId, getAccessibilityWindowId, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getAutofillViewId, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBoundsOnScreen, getBoundsOnScreen, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFadingEdge, getFadingEdgeLength, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getHotspotBounds, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getInverseMatrix, getIterableTextForAccessibility, getIteratorForGranularity, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOnLongClickListener, getOpticalInsets, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getRawLayoutDirection, getRawTextAlignment, getRawTextDirection, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getThreadedRenderer, getTooltip, getTooltipText, getTooltipView, getTop, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewRootImpl, getViewTreeObserver, getVisibility, getWidth, getWindowDisplayFrame, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasIdentityMatrix, hasImeFocus, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasShadow, hasWindowFocus, hideAutofillHighlight, includeForAccessibility, inflate, invalidate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isAccessibilitySelectionExtendable, isActionableForAccessibility, isActivated, isAssistBlocked, isAttachedToWindow, isAutofilled, isClickable, isContextClickable, isDefaultFocusHighlightEnabled, isDefaultFocusHighlightNeeded, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isForegroundInsidePadding, isFrameworkOptionalFitsSystemWindows, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInScrollingContainer, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionInherited, isLayoutDirectionResolved, isLayoutModeOptical, isLayoutRequested, isLayoutRtl, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isRootNamespace, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentInherited, isTextAlignmentResolved, isTextDirectionInherited, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUser, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, mapRectFromViewToScreenCoords, measure, notifyEnterOrExitForAutoFillIfNeeded, notifyViewAccessibilityStateChangedIfNeeded, offsetLeftAndRight, offsetTopAndBottom, onActivityResult, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCloseSystemDialogs, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityEventInternal, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onMovedToDisplay, onPointerCaptureChange, onPopulateAccessibilityEvent, onPopulateAccessibilityEventInternal, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onResolveDrawables, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, outputDirtyFlags, performAccessibilityAction, performAccessibilityActionInternal, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, pointInView, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeFrameMetricsListener, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestAccessibilityFocus, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestKeyboardShortcuts, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPaddingToInitialValues, resetPivot, resetRtlProperties, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventInternal, sendAccessibilityEventUnchecked, sendAccessibilityEventUncheckedInternal, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilitySelection, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAssistBlocked, setAutofilled, setAutofillHints, setAutofillId, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDisabledSystemUiVisibility, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setFocusedInCluster, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsRootNamespace, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setNotifyAutofillManagerOnClick, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOpticalInsets, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealClip, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setShowingLayoutBounds, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTagInternal, setTextAlignment, setTextDirection, setTooltip, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startActivityForResult, startAnimation, startDrag, startDragAndDrop, startMovingTask, startNestedScroll, stopNestedScroll, toGlobalMotionEvent, toLocalMotionEvent, toString, transformFromViewToWindowSpace, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDisplayListIfDirty, updateDragShadow, willNotCacheDrawing, willNotDraw
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface android.view.ViewParent
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayout
-
-
-
-
Field Detail
-
_lightEstimationConfig
public LightEstimationConfig _lightEstimationConfig
Don't use it. Public until full moving to Kotlin.- See Also:
ArSceneViewKt#setEstimatedEnvironmentLights(ArSceneView, EnvironmentLightsEstimate),ArSceneViewKt#getEstimatedEnvironmentLights(ArSceneView)
-
_estimatedEnvironmentLights
@Nullable public EnvironmentLightsEstimate _estimatedEnvironmentLights
-
-
Constructor Detail
-
ArSceneView
public ArSceneView(android.content.Context context)
Constructs a ArSceneView object and binds it to an Android Context.In order to have rendering work correctly,
setSession(Session)must be called.- Parameters:
context- the Android Context to use- See Also:
ArSceneView(Context, AttributeSet)
-
ArSceneView
public ArSceneView(android.content.Context context, android.util.AttributeSet attrs)Constructs a ArSceneView object and binds it to an Android Context.In order to have rendering work correctly,
setSession(Session)must be called.- Parameters:
context- the Android Context to useattrs- the Android AttributeSet to associate with- See Also:
setSession(Session)
-
-
Method Detail
-
getSession
@Nullable public com.google.ar.core.Session getSession()
Returns the ARCore Session used by this view.
-
setSession
public void setSession(com.google.ar.core.Session session)
Setup the view with an AR Session. This method must be called once to supply the ARCore session. The session is needed for any rendering to occur.Before calling this function, make sure to call the
Session.configure(Config)If you only want to change the Session Config please call
setSessionConfig(Config, boolean)and check that all your Session Config parameters are taken in account by ARCore at runtime. If it's not the case, you will have to create a new session and call this function.The session is expected to be configured with the update mode of LATEST_CAMERA_IMAGE. Without this configuration, the updating of the ARCore session could block the UI Thread causing poor UI experience.
- Parameters:
session- the ARCore session to use for this view- See Also:
ArSceneView(Context, AttributeSet)
-
getSessionConfig
public com.google.ar.core.Config getSessionConfig()
The session config used by this View.
-
setSessionConfig
public void setSessionConfig(com.google.ar.core.Config config, boolean configureSession)Define the session config used by this View.Please check that all your Session Config parameters are taken in account by ARCore at runtime. If it's not the case, you will have to create a new session and call
setSession(Session).- Parameters:
config- the new config to applyconfigureSession- false if you already called theSession.configure(Config)
-
resume
public void resume() throws java.lang.ExceptionResumes the rendering thread and ARCore session.This must be called from onResume().
-
resumeAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> resumeAsync(java.util.concurrent.Executor executor)
Non blocking call to resume the rendering thread and ARCore session in the backgroundThis must be called from onResume().
If called while another pause or resume is in progress, the resume will be enqueued and happen after the current operation completes.
- Returns:
- A CompletableFuture completed on the main thread once the resume has completed. The future will be completed exceptionally if the resume can not be done.
-
pause
public void pause()
Pauses the rendering thread and ARCore session.This must be called from onPause().
-
pauseAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> pauseAsync(java.util.concurrent.Executor executor)
Non blocking call to pause the rendering thread and ARCore session.This should be called from onPause().
If pauseAsync is called while another pause or resume is in progress, the pause will be enqueued and happen after the current operation completes.
- Returns:
- A
CompletableFuturecompleted on the main thread on the pause has completed. The future Will will be completed exceptionally if the resume can not be done.
-
destroy
public void destroy()
Required to exit Sceneform.Typically called from onDestroy().
-
destroySession
public void destroySession()
Destroy the session without touching the scene
-
onLayout
public void onLayout(boolean changed, int left, int top, int right, int bottom)
-
getArFrame
@Nullable @UiThread public com.google.ar.core.Frame getArFrame()
Returns the most recent ARCore Frame if it is available. The frame is updated at the beginning of each drawing frame. Callers of this method should not retain a reference to the return value, since it will be invalid to use the ARCore frame starting with the next frame.
-
getCameraStream
public CameraStream getCameraStream()
Returns the CameraStream, used to control if the occlusion should be enabled or disabled.
-
getPlaneRenderer
public PlaneRenderer getPlaneRenderer()
Returns PlaneRenderer, used to control plane visualization.
-
doFrame
public void doFrame(long frameTimeNanos)
Description copied from class:SceneViewCallback that occurs for each display frame. Updates the scene and reposts itself to be called by the choreographer on the next frame.- Specified by:
doFramein interfaceandroid.view.Choreographer.FrameCallback- Overrides:
doFramein classSceneView- Parameters:
frameTimeNanos- The time in nanoseconds when the frame started being rendered, in theSystem.nanoTime()timebase. Divide this value by1000000to convert it to theSystemClock.uptimeMillis()time base.
-
setCameraStreamRenderPriority
public void setCameraStreamRenderPriority(@IntRange(from=0L,to=7L) int priority)
-
isTrackingPlane
public boolean isTrackingPlane()
Retrieve if the view is currently tracking a plane.- Returns:
- true if the current frame is tracking at least one plane.
-
hasTrackedPlane
public boolean hasTrackedPlane()
Retrieve if the view has already tracked a plane.- Returns:
- true if the current frame has tracked at least one plane.
-
getAllPlanes
public java.util.Collection<com.google.ar.core.Plane> getAllPlanes()
Retrieve the view session tracked planes.
-
getAllPlanes
public java.util.Collection<com.google.ar.core.Plane> getAllPlanes(@Nullable com.google.ar.core.TrackingState... trackingStates)Retrieve the view session tracked planes with the specified tracking states.- Parameters:
trackingStates- the trackable tracking states or null for no states filter
-
getUpdatedPlanes
public java.util.Collection<com.google.ar.core.Plane> getUpdatedPlanes()
Retrieve the view last frame tracked planes.
-
getUpdatedPlanes
public java.util.Collection<com.google.ar.core.Plane> getUpdatedPlanes(@Nullable com.google.ar.core.TrackingState... trackingStates)Retrieve the view last frame tracked planes with the specified tracking states.- Parameters:
trackingStates- the trackable tracking states or null for no states filter
-
isTrackingAugmentedImage
public boolean isTrackingAugmentedImage()
Retrieve if the view is currently tracking an Augmented Image.- Returns:
- true if the current frame is fully tracking at least one Augmented.
-
hasTrackedAugmentedImage
public boolean hasTrackedAugmentedImage()
Retrieve if the view has already tracked a Augmented Image.- Returns:
- true if the current frame has tracked at least one Augmented Image.
-
getAllAugmentedImages
public java.util.Collection<com.google.ar.core.AugmentedImage> getAllAugmentedImages()
Retrieve the view session tracked Augmented Images.
-
getAllAugmentedImages
public java.util.Collection<com.google.ar.core.AugmentedImage> getAllAugmentedImages(@Nullable com.google.ar.core.TrackingState trackingState, @Nullable com.google.ar.core.AugmentedImage.TrackingMethod trackingMethod)Retrieve the view session tracked Augmented Images with the specified tracking state and method.- Parameters:
trackingState- the trackable tracking state or null for no states filtertrackingMethod- the trackable tracking method or null for no tracking method filter
-
getUpdatedAugmentedImages
public java.util.Collection<com.google.ar.core.AugmentedImage> getUpdatedAugmentedImages()
Retrieve the view last frame tracked Augmented Images.
-
getUpdatedAugmentedImages
public java.util.Collection<com.google.ar.core.AugmentedImage> getUpdatedAugmentedImages(@Nullable com.google.ar.core.TrackingState trackingState, @Nullable com.google.ar.core.AugmentedImage.TrackingMethod trackingMethod)Retrieve the view last frame tracked Augmented Images with the specified tracking state and method.- Parameters:
trackingState- the trackable tracking state or null for no states filtertrackingMethod- the trackable tracking method or null for no tracking method filter
-
setOnSessionConfigChangeListener
public void setOnSessionConfigChangeListener(@Nullable ArSceneView.OnSessionConfigChangeListener listener)Registers a callback to be invoked when the ARCore Session is to configured. The callback will only be invoked once after the Session default config has been applied and before it is configured on the Session.- Parameters:
listener- theArSceneView.OnSessionConfigChangeListenerto attach.
-
-