com.supermap.ar
Class ArView
- java.lang.Object
-
- com.supermap.ar.ArView
-
public class ArView extends java.lang.Object
AR view class The class Support Fragment can show camera view and AR scenery view and provide a series of functions to control AR sceneries.Calls ARRendererInfoUtil.saveARRendererMode(context,mode) before initializing.
-
-
Constructor Summary
Constructors Constructor and Description ArView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description float
getDistanceFactor()
Gets the distance factor of rendering objectsfloat
getHead()
Gets the height of the current observation pointPoint3D
getIntersectionPoint(int x, int y)
Gets the center of screen to set the location of ArObjectfloat
getMaxDistanceToRender()
Gets the distance range that the objects within it will be displayed.World
getWorld()
Gets AR scenevoid
setARRendererContext(android.content.Context context)
AR rendering.void
setArViewAdapter(ArViewAdapter adapter)
Sets an adapter to draw view on the top of AR viewvoid
setDistanceFactor(float factor)
Sets the distance factor rendering objects.void
setHead(float headFactor)
Sets the height parameter of observation point. 0 is by default.void
setMaxDistanceToRender(float meters)
Sets the distance range that the objects within it will be displayed.void
setOnClickArObjectListener(OnClickArObjectListener listener)
Sets ArObject clicking listenervoid
setWorld(World world)
AR scene to load ArObjectvoid
storeArObjectViewAndUri(android.view.View view, ArObject arObject)
Sets the view relative to ArObject
-
-
-
Method Detail
-
setARRendererContext
public void setARRendererContext(android.content.Context context)
AR rendering.- Parameters:
context
- The context.
-
getIntersectionPoint
public Point3D getIntersectionPoint(int x, int y)
Gets the center of screen to set the location of ArObject- Parameters:
x
- x coordinate of screeny
- y coordinate of screen- Returns:
- coordinate point.
-
storeArObjectViewAndUri
public void storeArObjectViewAndUri(android.view.View view, ArObject arObject)
Sets the view relative to ArObject- Parameters:
view
- the viewarObject
- ArObject object
-
setOnClickArObjectListener
public void setOnClickArObjectListener(OnClickArObjectListener listener)
Sets ArObject clicking listener- Parameters:
listener
- Click listener.
-
getWorld
public World getWorld()
Gets AR scene- Returns:
- AR scene
-
setWorld
public void setWorld(World world)
AR scene to load ArObject- Parameters:
world
- AR scene
-
setHead
public void setHead(float headFactor)
Sets the height parameter of observation point. 0 is by default. Ranges from 0 to 100 in meter.- Parameters:
headFactor
- the height
-
setMaxDistanceToRender
public void setMaxDistanceToRender(float meters)
Sets the distance range that the objects within it will be displayed.- Parameters:
meters
- the distance range
-
getMaxDistanceToRender
public float getMaxDistanceToRender()
Gets the distance range that the objects within it will be displayed.- Returns:
- meters controls the rendering range
-
setDistanceFactor
public void setDistanceFactor(float factor)
Sets the distance factor rendering objects. The greater the value, the closer the object- Parameters:
factor
- the distance factor
-
getDistanceFactor
public float getDistanceFactor()
Gets the distance factor of rendering objects- Returns:
- the distance factor
-
getHead
public float getHead()
Gets the height of the current observation point- Returns:
- the height of the current observation point
-
setArViewAdapter
public void setArViewAdapter(ArViewAdapter adapter)
Sets an adapter to draw view on the top of AR view- Parameters:
adapter
- the adapter
-
-