com.supermap.ar.areffect
Class CameraWindowRenderer
- java.lang.Object
-
- com.supermap.ar.areffect.CameraWindowRenderer
-
public class CameraWindowRenderer extends java.lang.ObjectCamera window renderer Render the corresponding window in the map dynamic layer when the phone is looking down at the ground
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classCameraWindowRenderer.RenderTypeApply colours to a drawing type
-
Constructor Summary
Constructors Constructor and Description CameraWindowRenderer(EffectView arView, DynamicView dynamicView)The constructorCameraWindowRenderer(EffectView arView, Map map, CameraWindowRenderer.RenderType renderType)The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddispose()The destruction Free native layer memoryDynamicPolygongetDynamicResult()floatgetMaxDistance()Gets the furthest distance to renderfloatgetPlaneHeight()Gets the ground height, default -1.3 mCameraWindowRenderer.RenderTypegetRenderType()Gets the current render typejava.util.List<android.graphics.Point>getVertices()Gets vertex set degreebooleanisEnabled()Get enabled statusvoidrefresh()refreshvoidrefresh(long ms)refreshvoidsetDynamicResult(DynamicPolygon dynamicPolygon)Sets dynamic objects for dynamic layer renderingvoidsetEnabled(boolean enabled)Setting the Enable StatusvoidsetMaxDistance(float maxDistance)Sets the maximum render distance, less than or equal to the far clipping plane distance, default is 5voidsetPlaneHeight(float planeHeight)Set ground heightvoidsetVertices(java.util.List<android.graphics.Point> vertices)43/5000 Set the vertex set of the window (in pixels px) A set of points that must be ordered end to end
-
-
-
Constructor Detail
-
CameraWindowRenderer
public CameraWindowRenderer(EffectView arView, DynamicView dynamicView)
The constructor- Parameters:
arView-dynamicView-
-
CameraWindowRenderer
public CameraWindowRenderer(EffectView arView, Map map, CameraWindowRenderer.RenderType renderType)
The constructor- Parameters:
arView-map-renderType- Apply colours to a drawing typeCameraWindowRenderer.RenderType
-
-
Method Detail
-
getPlaneHeight
public float getPlaneHeight()
Gets the ground height, default -1.3 m- Returns:
-
setPlaneHeight
public void setPlaneHeight(float planeHeight)
Set ground height- Parameters:
planeHeight-
-
getVertices
public java.util.List<android.graphics.Point> getVertices()
Gets vertex set degree- Returns:
-
setVertices
public void setVertices(java.util.List<android.graphics.Point> vertices)
43/5000 Set the vertex set of the window (in pixels px) A set of points that must be ordered end to end- Parameters:
vertices- eg: int left = efView.getLeft(); int top = efView.getTop(); int bottom = efView.getBottom(); int right = efView.getRight(); cameraWindowRenderer.setVertices(Arrays.asList( new Point(left,top),new Point(right,top),new Point(right,bottom),new Point(left,bottom),new Point(left,top) ));
-
getMaxDistance
public float getMaxDistance()
Gets the furthest distance to render- Returns:
-
setMaxDistance
public void setMaxDistance(float maxDistance)
Sets the maximum render distance, less than or equal to the far clipping plane distance, default is 5- Parameters:
maxDistance-
-
isEnabled
public boolean isEnabled()
Get enabled status- Returns:
-
setEnabled
public void setEnabled(boolean enabled)
Setting the Enable Status- Parameters:
enabled-
-
setDynamicResult
public void setDynamicResult(DynamicPolygon dynamicPolygon)
Sets dynamic objects for dynamic layer rendering- Parameters:
dynamicPolygon-
-
getDynamicResult
public DynamicPolygon getDynamicResult()
-
refresh
public void refresh(long ms)
refresh- Parameters:
ms- Interval for refreshing
-
refresh
public void refresh()
refresh
-
getRenderType
public CameraWindowRenderer.RenderType getRenderType()
Gets the current render type- Returns:
-
dispose
public void dispose()
The destructionFree native layer memory
-
-