com.supermap.ar
Class ArView
- java.lang.Object
-
- com.supermap.ar.ArView
-
public class ArView extends java.lang.ObjectAR 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 floatgetDistanceFactor()Gets the distance factor of rendering objectsfloatgetHead()Gets the height of the current observation pointPoint3DgetIntersectionPoint(int x, int y)Gets the center of screen to set the location of ArObjectfloatgetMaxDistanceToRender()Gets the distance range that the objects within it will be displayed.WorldgetWorld()Gets AR scenevoidsetARRendererContext(android.content.Context context)AR rendering.voidsetArViewAdapter(ArViewAdapter adapter)Sets an adapter to draw view on the top of AR viewvoidsetDistanceFactor(float factor)Sets the distance factor rendering objects.voidsetHead(float headFactor)Sets the height parameter of observation point. 0 is by default.voidsetMaxDistanceToRender(float meters)Sets the distance range that the objects within it will be displayed.voidsetOnClickArObjectListener(OnClickArObjectListener listener)Sets ArObject clicking listenervoidsetWorld(World world)AR scene to load ArObjectvoidstoreArObjectViewAndUri(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
-
-