com.supermap.ar.areffect

类 EffectView

  • java.lang.Object
    • android.view.View
      • android.view.ViewGroup
        • android.widget.RelativeLayout
          • com.supermap.ar.areffect.EffectView
  • 所有已实现的接口:
    android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent
    直接已知子类:
    AREffectView, HmsAREffectView, ImageEffectView, VideoEffectView, VideoEffectView2


    public class EffectView
    extends android.widget.RelativeLayout
    基础视图控件类
    • 嵌套类概要

      嵌套类 
      限定符和类型 类和说明
      static interface  EffectView.OnSceneTouchListener
      场景触摸监听
      static interface  EffectView.OnTapPlaneListener
      地面点击监听
      static interface  EffectView.OnUpdateListener
      场景更新监听
      • 从类继承的嵌套类/接口 android.widget.RelativeLayout

        android.widget.RelativeLayout.LayoutParams
      • 从类继承的嵌套类/接口 android.view.ViewGroup

        android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
      • 从类继承的嵌套类/接口 android.view.View

        android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, 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.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
    • 字段概要

      • 从类继承的字段 android.widget.RelativeLayout

        ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUE
      • 从类继承的字段 android.view.ViewGroup

        FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
      • 从类继承的字段 android.view.View

        ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, 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, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, 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_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, 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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
    • 构造器概要

      构造器 
      构造器和说明
      EffectView(android.content.Context context)
      构造方法
      EffectView(android.content.Context context, android.util.AttributeSet attrs)
      构造方法
      EffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
      构造方法
      EffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
      构造方法
    • 方法概要

      所有方法 实例方法 具体方法 已过时的方法 
      限定符和类型 方法和说明
      void addElement(AREffectElement element)
      将元素添加至场景数据
      void addElement(ARGltfElement element)
      将元素添加至场景数据
      void addElement(ARParticleElement element)
      将元素添加至场景数据
      void addElement(ARVideoElement element)
      将元素添加至场景数据
      void addElement(ARViewElement element)
      将元素添加至场景数据
      void addElement(ARWebViewElement element)
      将元素添加至场景数据
      void addOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
      添加指定的更新监听
      void clearElements()
      清除场景中所有对象
      void closeGesture()
      已过时。 
      void deleteNode(Node node)
      删除节点下的所有节点
      void destroyResources()
      手动调用销毁资源,在onDestroy()中销毁资源,导致其他sceneview不能使用
      java.util.List<AREffectElement> getAllEffectElement()
      获取data中所有场景元素
      java.util.List<ARGltfElement> getAllGltfElement()
      获取data中所有gltf模型元素
      java.util.List<ARParticleElement> getAllParticleElement()
      获取data中所有粒子元素
      java.util.List<ARVideoElement> getAllVideoElement()
      获取data中所有视频元素
      java.util.List<ARViewElement> getAllViewElement()
      获取data中所有视图元素
      java.util.List<ARWebViewElement> getAllWebViewElement()
      获取data中所有网页元素
      float getAzimuth()
      获取手机方位角
      java.util.List<Point3D> getBasePlanePoints()
      获取基准平面上的不共线的点集 Arrays.asList(new Point3D(0, 0, height), new Point3D(0, 1, height), new Point3D(1, 0, height)) 作用:主要用于射线检测
      Point3D getCameraPosition()
      获取当前相机位置
      CameraRecordControl getCameraRecordControl()
      获取相机记录控制器
      Location getDeviceLocation()
      获取设备的地理位置
      float getDragSensitivity()
      获取拖拽时的灵敏度(默认为屏幕拖动1dp,AR场景中移动0.002m)
      java.util.List<AREffectElement> getEffectElement(java.lang.String name)
      根据名称获取特效元素
      float getElementDistance(AREffectElement element)
      获取当前特效元素的距离
      float getFarClipPlane()
      获取远裁剪平面距离
      android.view.View getForegroundView()
      获取前景层
      java.util.List<ARGltfElement> getGltfElement(java.lang.String name)
      根据名称获取特效元素
      Quaternion getLookRotation(AREffectElement element)
      获取使元素朝向相机时的 元素的旋转角度
      Quaternion getLookRotation(Point3D position)
      获取某位置朝向相机时的元素的旋转角度
      Quaternion getLookRotation(Vector3 position)
      获取某位置朝向相机时的元素的旋转角度
      java.lang.String getMapName()
      获取地图名称
      void getNearClipPlane()
      获取近裁剪平面距离
      OcclusionHelper getOcclusionHelper()
      获取遮挡助手
      java.util.List<ARParticleElement> getParticleElement(java.lang.String name)
      根据名称获取特效元素
      java.lang.String getSceneDataPath()
      获取场景数据路径
      SceneView getSceneView()
      获取ArSceneView
      TransformableNode getTransformableNode()
      获取可变节点
      UAVLayers getUAVLayers()
      获取无人机图层
      java.util.List<ARVideoElement> getVideoElement(java.lang.String name)
      根据名称获取特效元素
      java.util.List<ARViewElement> getViewElement(java.lang.String name)
      根据名称获取特效元素
      java.util.List<ARWebViewElement> getWebViewElement(java.lang.String name)
      根据名称获取特效元素
      boolean loadData()
      加载场景
      void onDestroy()
      销毁
      void onPause()
      释放
      void onPeekTouch(HitTestResult hitTestResult, android.view.MotionEvent motionEvent) 
      void onResume()
      唤醒
      void openGesture()
      已过时。 
      void removeElement(AREffectElement element)
      移除场景中的元素
      void removeElement(ARGltfElement element)
      移除场景中的元素
      void removeElement(ARParticleElement element)
      移除场景中的元素
      void removeElement(ARVideoElement element)
      移除场景中的元素
      void removeElement(ARViewElement element)
      移除场景中的元素
      void removeElement(ARWebViewElement element)
      移除场景中的元素
      void removeOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
      移除指定的更新监听
      boolean save()
      保存场景
      void setAzimuth(float azimuth)
      设置设备方位角
      void setBasePlaneHeight(float height)
      设置基准平面高度 比相机的高度低,为负,eg:AR中地面的高度为-1.6米
      void setDeviceLocation(Location deviceLocation)
      设置设备的地理位置
      void setDragSensitivity(float sensitivity)
      设置拖拽时的灵敏度 默认值为0.002
      void setFarClipPlane(float distance)
      设置远裁剪平面距离
      void setMapName(java.lang.String mapName)
      设置地图名称
      void setNearClipPlane(float distance)
      设置近裁剪平面距离
      void setOnSceneTouchListener(EffectView.OnSceneTouchListener listener)
      设置场景触摸监听 注: 若使用时,未点击中AR场景中的元素, 会产生NullPointerException
      void setOnTouchListener(android.view.View.OnTouchListener l)
      设置触摸监听
      void setSceneCenter(Point3D center)
      已过时。 
      void setSceneDataPath(java.lang.String sceneDataPath)
      设置场景数据路径
      void setVisibleDistance(float distance)
      设置可视距离 0米-100米之间
      Vector3 worldToScreenPoint(Point3D p)
      真实世界点转换成屏幕上点
      • 从类继承的方法 android.widget.RelativeLayout

        dispatchPopulateAccessibilityEvent, generateLayoutParams, getBaseline, getGravity, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
      • 从类继承的方法 android.view.ViewGroup

        addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onRequestSendAccessibilityEvent, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
      • 从类继承的方法 android.view.View

        addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
      • 从类继承的方法 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 从接口继承的方法 android.view.ViewParent

        canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
    • 构造器详细资料

      • EffectView

        public EffectView(android.content.Context context)
        构造方法
        参数:
        context -
      • EffectView

        public EffectView(android.content.Context context,
                          android.util.AttributeSet attrs)
        构造方法
      • EffectView

        public EffectView(android.content.Context context,
                          android.util.AttributeSet attrs,
                          int defStyleAttr)
        构造方法
      • EffectView

        public EffectView(android.content.Context context,
                          android.util.AttributeSet attrs,
                          int defStyleAttr,
                          int defStyleRes)
        构造方法
    • 方法详细资料

      • addOnUpdateListener

        public void addOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
        添加指定的更新监听
        参数:
        onUpdateListener -
      • removeOnUpdateListener

        public void removeOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
        移除指定的更新监听
        参数:
        onUpdateListener -
      • getSceneView

        public SceneView getSceneView()
        获取ArSceneView
        返回:
      • setOnSceneTouchListener

        public void setOnSceneTouchListener(EffectView.OnSceneTouchListener listener)
        设置场景触摸监听 注: 若使用时,未点击中AR场景中的元素, 会产生NullPointerException
        参数:
        listener -
      • onResume

        public void onResume()
        唤醒
      • onPause

        public void onPause()
        释放
      • onDestroy

        public void onDestroy()
        销毁
      • setVisibleDistance

        public void setVisibleDistance(float distance)
        设置可视距离 0米-100米之间
        参数:
        distance -
      • setFarClipPlane

        public void setFarClipPlane(float distance)
        设置远裁剪平面距离
        参数:
        distance -
      • getFarClipPlane

        public float getFarClipPlane()
        获取远裁剪平面距离
        返回:
      • setNearClipPlane

        public void setNearClipPlane(float distance)
        设置近裁剪平面距离
        参数:
        distance -
      • getNearClipPlane

        public void getNearClipPlane()
        获取近裁剪平面距离
      • getDeviceLocation

        public Location getDeviceLocation()
        获取设备的地理位置
        返回:
      • getAzimuth

        public float getAzimuth()
        获取手机方位角
        返回:
      • setDeviceLocation

        public void setDeviceLocation(Location deviceLocation)
        设置设备的地理位置
        参数:
        deviceLocation -
      • setAzimuth

        public void setAzimuth(float azimuth)
        设置设备方位角
        参数:
        azimuth -
      • getElementDistance

        public float getElementDistance(AREffectElement element)
        获取当前特效元素的距离
        参数:
        element -
      • getCameraPosition

        public Point3D getCameraPosition()
        获取当前相机位置
        返回:
      • addElement

        public void addElement(AREffectElement element)
        将元素添加至场景数据
        参数:
        element -
      • addElement

        public void addElement(ARParticleElement element)
        将元素添加至场景数据
        参数:
        element - 元素
      • addElement

        public void addElement(ARGltfElement element)
        将元素添加至场景数据
        参数:
        element - 元素
      • addElement

        public void addElement(ARViewElement element)
        将元素添加至场景数据
        参数:
        element - 元素
      • addElement

        public void addElement(ARVideoElement element)
        将元素添加至场景数据
        参数:
        element - 元素
      • addElement

        public void addElement(ARWebViewElement element)
        将元素添加至场景数据
        参数:
        element - 元素
      • getEffectElement

        public java.util.List<AREffectElement> getEffectElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name -
        返回:
      • getParticleElement

        public java.util.List<ARParticleElement> getParticleElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name - 名称
        返回:
        元素集
      • getGltfElement

        public java.util.List<ARGltfElement> getGltfElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name - 名称
        返回:
        元素集
      • getViewElement

        public java.util.List<ARViewElement> getViewElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name - 名称
        返回:
        元素集
      • getVideoElement

        public java.util.List<ARVideoElement> getVideoElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name - 名称
        返回:
        元素集
      • getWebViewElement

        public java.util.List<ARWebViewElement> getWebViewElement(java.lang.String name)
        根据名称获取特效元素
        参数:
        name - 名称
        返回:
        元素集
      • getAllEffectElement

        public java.util.List<AREffectElement> getAllEffectElement()
        获取data中所有场景元素
        返回:
      • getAllParticleElement

        public java.util.List<ARParticleElement> getAllParticleElement()
        获取data中所有粒子元素
        返回:
        元素集
      • getAllGltfElement

        public java.util.List<ARGltfElement> getAllGltfElement()
        获取data中所有gltf模型元素
        返回:
        元素集
      • getAllViewElement

        public java.util.List<ARViewElement> getAllViewElement()
        获取data中所有视图元素
        返回:
        元素集
      • getAllVideoElement

        public java.util.List<ARVideoElement> getAllVideoElement()
        获取data中所有视频元素
        返回:
        元素集
      • getAllWebViewElement

        public java.util.List<ARWebViewElement> getAllWebViewElement()
        获取data中所有网页元素
        返回:
        元素集
      • removeElement

        public void removeElement(AREffectElement element)
        移除场景中的元素
      • removeElement

        public void removeElement(ARParticleElement element)
        移除场景中的元素
        参数:
        element - 将移除的元素
      • removeElement

        public void removeElement(ARGltfElement element)
        移除场景中的元素
        参数:
        element - 将移除的元素
      • removeElement

        public void removeElement(ARViewElement element)
        移除场景中的元素
        参数:
        element - 将移除的元素
      • removeElement

        public void removeElement(ARVideoElement element)
        移除场景中的元素
        参数:
        element - 将移除的元素
      • removeElement

        public void removeElement(ARWebViewElement element)
        移除场景中的元素
        参数:
        element - 将移除的元素
      • getLookRotation

        public Quaternion getLookRotation(AREffectElement element)
        获取使元素朝向相机时的 元素的旋转角度
        参数:
        element -
        返回:
      • getLookRotation

        public Quaternion getLookRotation(Vector3 position)
        获取某位置朝向相机时的元素的旋转角度
        参数:
        position -
        返回:
      • getLookRotation

        public Quaternion getLookRotation(Point3D position)
        获取某位置朝向相机时的元素的旋转角度
        参数:
        position -
        返回:
      • setSceneCenter

        @Deprecated
        public void setSceneCenter(Point3D center)
        已过时。 
        设置AR场景变化中心(AR场景的缩放/旋转以center为中心)
        参数:
        center -
      • openGesture

        @Deprecated
        public void openGesture()
        已过时。 
        开启手势控制(针对整个AR场景)
      • closeGesture

        @Deprecated
        public void closeGesture()
        已过时。 
        关闭手势控制(针对整个AR场景)
      • save

        public boolean save()
        保存场景
        返回:
        状态值,true为保存成功
      • loadData

        public boolean loadData()
        加载场景
        返回:
        状态值,true为加载成功
      • onPeekTouch

        public void onPeekTouch(HitTestResult hitTestResult,
                                android.view.MotionEvent motionEvent)
      • getDragSensitivity

        public float getDragSensitivity()
        获取拖拽时的灵敏度(默认为屏幕拖动1dp,AR场景中移动0.002m)
        返回:
      • setDragSensitivity

        public void setDragSensitivity(float sensitivity)
        设置拖拽时的灵敏度 默认值为0.002
        参数:
        sensitivity -
      • getSceneDataPath

        public java.lang.String getSceneDataPath()
        获取场景数据路径
        返回:
      • setSceneDataPath

        public void setSceneDataPath(java.lang.String sceneDataPath)
        设置场景数据路径
        参数:
        sceneDataPath -
      • getForegroundView

        public android.view.View getForegroundView()
        获取前景层
        返回:
      • setBasePlaneHeight

        public void setBasePlaneHeight(float height)
        设置基准平面高度 比相机的高度低,为负,eg:AR中地面的高度为-1.6米
        参数:
        height - 高度值
      • getBasePlanePoints

        public java.util.List<Point3D> getBasePlanePoints()
        获取基准平面上的不共线的点集

        Arrays.asList(new Point3D(0, 0, height), new Point3D(0, 1, height), new Point3D(1, 0, height)) 作用:主要用于射线检测

        返回:
        基准平面不共线的三点组成的点集
      • setOnTouchListener

        public void setOnTouchListener(android.view.View.OnTouchListener l)
        设置触摸监听
        覆盖:
        setOnTouchListener 在类中 android.view.View
        参数:
        1 -
      • deleteNode

        public void deleteNode(Node node)
        删除节点下的所有节点
        参数:
        node -
      • clearElements

        public void clearElements()
        清除场景中所有对象
      • destroyResources

        public void destroyResources()
        手动调用销毁资源,在onDestroy()中销毁资源,导致其他sceneview不能使用
      • getUAVLayers

        public UAVLayers getUAVLayers()
        获取无人机图层
        返回:
      • worldToScreenPoint

        public Vector3 worldToScreenPoint(Point3D p)
        真实世界点转换成屏幕上点
        返回:
      • getMapName

        public java.lang.String getMapName()
        获取地图名称
        返回:
      • setMapName

        public void setMapName(java.lang.String mapName)
        设置地图名称
        参数:
        mapName -
      • getTransformableNode

        public TransformableNode getTransformableNode()
        获取可变节点
        返回: