com.supermap.ar.areffect
Class EffectView
- java.lang.Object
-
- android.view.View
-
- android.view.ViewGroup
-
- android.widget.RelativeLayout
-
- com.supermap.ar.areffect.EffectView
-
- All Implemented Interfaces:
- android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent
- Direct Known Subclasses:
- HmsAREffectView, ImageEffectView, VideoEffectView, VideoEffectView2
public class EffectView extends android.widget.RelativeLayout
Base view control class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
EffectView.OnSceneTouchListener
Scenario Update Listenerstatic interface
EffectView.OnTapPlaneListener
Ground click monitorstatic interface
EffectView.OnUpdateListener
Scenario Update Listener-
Nested classes/interfaces inherited from class android.widget.RelativeLayout
android.widget.RelativeLayout.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.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
-
-
Field Summary
-
Fields inherited from class 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
-
Fields inherited from class 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
-
Fields inherited from class 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
-
-
Constructor Summary
Constructors Constructor and Description EffectView(android.content.Context context)
constructorEffectView(android.content.Context context, android.util.AttributeSet attrs)
constructorEffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
constructorEffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description void
addElement(AREffectElement element)
Add the element to the scene datavoid
addElement(ARGltfElement element)
void
addElement(ARParticleElement element)
void
addElement(ARVideoElement element)
void
addElement(ARViewElement element)
void
addElement(ARWebViewElement element)
void
addOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
Adds the specified update listenervoid
clearElements()
Clears all objects in the scenevoid
closeGesture()
Deprecated.void
deleteNode(Node node)
Delete all nodes under the nodevoid
destroyResources()
Manually calling the destroy resource destroys the resource inonDestroy()
, causing other SceneViews to become unavailablejava.util.List<AREffectElement>
getAllEffectElement()
Gets all scene elements in datajava.util.List<ARGltfElement>
getAllGltfElement()
java.util.List<ARParticleElement>
getAllParticleElement()
java.util.List<ARVideoElement>
getAllVideoElement()
java.util.List<ARViewElement>
getAllViewElement()
java.util.List<ARWebViewElement>
getAllWebViewElement()
float
getAzimuth()
Get mobile phone azimuthjava.util.List<Point3D>
getBasePlanePoints()
Point3D
getCameraPosition()
Gets the current camera positionLocation
getDeviceLocation()
Get the geographical location of the devicefloat
getDragSensitivity()
Get drag sensitivity (default: 1dp screen drag, 0.002m movement in AR scenario)java.util.List<AREffectElement>
getEffectElement(java.lang.String name)
Gets the effect element by namefloat
getElementDistance(AREffectElement element)
Gets the distance of the current effect elementfloat
getFarClipPlane()
Gets the distance of the far clipping planeandroid.view.View
getForegroundView()
Acquisition of foregroundjava.util.List<ARGltfElement>
getGltfElement(java.lang.String name)
Quaternion
getLookRotation(AREffectElement element)
Gets when the element is pointed towards the camera Rotation Angle of the elementQuaternion
getLookRotation(Point3D position)
Gets the rotation Angle of the element at a position toward the cameraQuaternion
getLookRotation(Vector3 position)
Gets the rotation Angle of the element at a position toward the camerajava.lang.String
getMapName()
Gets map namevoid
getNearClipPlane()
Gets the clipping plane distanceOcclusionHelper
getOcclusionHelper()
Get occlusion assistantjava.util.List<ARParticleElement>
getParticleElement(java.lang.String name)
java.lang.String
getSceneDataPath()
Get the path of scenario dataSceneView
getSceneView()
Get ArSceneViewUAVLayers
getUAVLayers()
Get the drone layerjava.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()
destructionvoid
onPause()
releasevoid
onPeekTouch(HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
void
onResume()
Wake upvoid
openGesture()
Deprecated.void
removeElement(AREffectElement element)
Remove elements from the scenevoid
removeElement(ARGltfElement element)
void
removeElement(ARParticleElement element)
void
removeElement(ARVideoElement element)
void
removeElement(ARViewElement element)
void
removeElement(ARWebViewElement element)
void
removeOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
Removes the specified update listenerboolean
save()
void
setAzimuth(float azimuth)
Set the device azimuthvoid
setBasePlaneHeight(float height)
Set the height of the base plane Lower than the height of the camera, is negative, eg: AR ground height is -1.6 metersvoid
setDeviceLocation(Location deviceLocation)
Set the geographical location of the devicevoid
setDragSensitivity(float sensitivity)
Set drag sensitivity Default value is 0.002void
setFarClipPlane(float distance)
Set the distance of the far clipping planevoid
setMapName(java.lang.String mapName)
Sets map namevoid
setNearClipPlane(float distance)
Set the distance between the clipping planevoid
setOnSceneTouchListener(EffectView.OnSceneTouchListener listener)
Set the scene touch listener If the element in the AR scene is not clicked when used, NullPointerExceptionvoid
setSceneCenter(Point3D center)
Deprecated.void
setSceneDataPath(java.lang.String sceneDataPath)
Set the path of scenario datavoid
setVisibleDistance(float distance)
Set viewing distance Between 0 meters and 100 metersVector3
worldToScreenPoint(Point3D p)
Real world points are converted to on-screen points-
Methods inherited from class android.widget.RelativeLayout
dispatchPopulateAccessibilityEvent, generateLayoutParams, getBaseline, getGravity, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
-
Methods inherited from class 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
-
Methods inherited from class 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, setOnTouchListener, 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
-
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, requestFitSystemWindows
-
-
-
-
Constructor Detail
-
EffectView
public EffectView(android.content.Context context)
constructor- Parameters:
context
-
-
EffectView
public EffectView(android.content.Context context, android.util.AttributeSet attrs)
constructor
-
EffectView
public EffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
constructor
-
EffectView
public EffectView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
constructor
-
-
Method Detail
-
addOnUpdateListener
public void addOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
Adds the specified update listener- Parameters:
onUpdateListener
-
-
removeOnUpdateListener
public void removeOnUpdateListener(EffectView.OnUpdateListener onUpdateListener)
Removes the specified update listener- Parameters:
onUpdateListener
-
-
getSceneView
public SceneView getSceneView()
Get ArSceneView- Returns:
-
setOnSceneTouchListener
public void setOnSceneTouchListener(EffectView.OnSceneTouchListener listener)
Set the scene touch listener If the element in the AR scene is not clicked when used, NullPointerException- Parameters:
listener
-
-
onResume
public void onResume()
Wake up
-
onPause
public void onPause()
release
-
onDestroy
public void onDestroy()
destruction
-
setVisibleDistance
public void setVisibleDistance(float distance)
Set viewing distance Between 0 meters and 100 meters- Parameters:
distance
-
-
setFarClipPlane
public void setFarClipPlane(float distance)
Set the distance of the far clipping plane- Parameters:
distance
-
-
getFarClipPlane
public float getFarClipPlane()
Gets the distance of the far clipping plane- Returns:
-
setNearClipPlane
public void setNearClipPlane(float distance)
Set the distance between the clipping plane- Parameters:
distance
-
-
getNearClipPlane
public void getNearClipPlane()
Gets the clipping plane distance
-
getDeviceLocation
public Location getDeviceLocation()
Get the geographical location of the device- Returns:
-
getAzimuth
public float getAzimuth()
Get mobile phone azimuth- Returns:
-
setDeviceLocation
public void setDeviceLocation(Location deviceLocation)
Set the geographical location of the device- Parameters:
deviceLocation
-
-
setAzimuth
public void setAzimuth(float azimuth)
Set the device azimuth- Parameters:
azimuth
-
-
getElementDistance
public float getElementDistance(AREffectElement element)
Gets the distance of the current effect element- Parameters:
element
-
-
getCameraPosition
public Point3D getCameraPosition()
Gets the current camera position- Returns:
-
addElement
public void addElement(AREffectElement element)
Add the element to the scene data- Parameters:
element
-
-
addElement
public void addElement(ARParticleElement element)
-
addElement
public void addElement(ARGltfElement element)
-
addElement
public void addElement(ARViewElement element)
-
addElement
public void addElement(ARVideoElement element)
-
addElement
public void addElement(ARWebViewElement element)
-
getEffectElement
public java.util.List<AREffectElement> getEffectElement(java.lang.String name)
Gets the effect element by name- Parameters:
name
-- Returns:
-
getParticleElement
public java.util.List<ARParticleElement> getParticleElement(java.lang.String name)
-
getGltfElement
public java.util.List<ARGltfElement> getGltfElement(java.lang.String name)
-
getViewElement
public java.util.List<ARViewElement> getViewElement(java.lang.String name)
-
getVideoElement
public java.util.List<ARVideoElement> getVideoElement(java.lang.String name)
-
getWebViewElement
public java.util.List<ARWebViewElement> getWebViewElement(java.lang.String name)
-
getAllEffectElement
public java.util.List<AREffectElement> getAllEffectElement()
Gets all scene elements in data- Returns:
-
getAllParticleElement
public java.util.List<ARParticleElement> getAllParticleElement()
-
getAllGltfElement
public java.util.List<ARGltfElement> getAllGltfElement()
-
getAllViewElement
public java.util.List<ARViewElement> getAllViewElement()
-
getAllVideoElement
public java.util.List<ARVideoElement> getAllVideoElement()
-
getAllWebViewElement
public java.util.List<ARWebViewElement> getAllWebViewElement()
-
removeElement
public void removeElement(AREffectElement element)
Remove elements from the scene
-
removeElement
public void removeElement(ARParticleElement element)
-
removeElement
public void removeElement(ARGltfElement element)
-
removeElement
public void removeElement(ARViewElement element)
-
removeElement
public void removeElement(ARVideoElement element)
-
removeElement
public void removeElement(ARWebViewElement element)
-
getLookRotation
public Quaternion getLookRotation(AREffectElement element)
Gets when the element is pointed towards the camera Rotation Angle of the element- Parameters:
element
-- Returns:
-
getLookRotation
public Quaternion getLookRotation(Vector3 position)
Gets the rotation Angle of the element at a position toward the camera- Parameters:
position
-- Returns:
-
getLookRotation
public Quaternion getLookRotation(Point3D position)
Gets the rotation Angle of the element at a position toward the camera- Parameters:
position
-- Returns:
-
setSceneCenter
@Deprecated public void setSceneCenter(Point3D center)
Deprecated.Set the AR scene change center (the zoom/rotation of the AR scene is centered around center)- Parameters:
center
-
-
openGesture
@Deprecated public void openGesture()
Deprecated.Turn on gesture control (for the entire AR scene)
-
closeGesture
@Deprecated public void closeGesture()
Deprecated.Turn off gesture controls (for the entire AR scene)
-
save
public boolean save()
-
loadData
public boolean loadData()
-
onPeekTouch
public void onPeekTouch(HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
getDragSensitivity
public float getDragSensitivity()
Get drag sensitivity (default: 1dp screen drag, 0.002m movement in AR scenario)- Returns:
-
setDragSensitivity
public void setDragSensitivity(float sensitivity)
Set drag sensitivity Default value is 0.002- Parameters:
sensitivity
-
-
getSceneDataPath
public java.lang.String getSceneDataPath()
Get the path of scenario data- Returns:
-
setSceneDataPath
public void setSceneDataPath(java.lang.String sceneDataPath)
Set the path of scenario data- Parameters:
sceneDataPath
-
-
getForegroundView
public android.view.View getForegroundView()
Acquisition of foreground- Returns:
-
setBasePlaneHeight
public void setBasePlaneHeight(float height)
Set the height of the base plane Lower than the height of the camera, is negative, eg: AR ground height is -1.6 meters- Parameters:
height
- Highly value
-
getBasePlanePoints
public java.util.List<Point3D> getBasePlanePoints()
-
getOcclusionHelper
public OcclusionHelper getOcclusionHelper()
Get occlusion assistant- Returns:
- occlusion assistant
OcclusionHelper
-
deleteNode
public void deleteNode(Node node)
Delete all nodes under the node- Parameters:
node
-
-
clearElements
public void clearElements()
Clears all objects in the scene
-
destroyResources
public void destroyResources()
Manually calling the destroy resource destroys the resource inonDestroy()
, causing other SceneViews to become unavailable
-
getUAVLayers
public UAVLayers getUAVLayers()
Get the drone layer- Returns:
-
worldToScreenPoint
public Vector3 worldToScreenPoint(Point3D p)
Real world points are converted to on-screen points- Parameters:
p
-- Returns:
-
getMapName
public java.lang.String getMapName()
Gets map name- Returns:
-
setMapName
public void setMapName(java.lang.String mapName)
Sets map name- Parameters:
mapName
-
-
-