-
类概要 类 说明 CeilingExcavator ExcavationParameter 开挖参数 用于开挖计算Excavator.calculate(ExcavationParameter)
ExcavationParameter.Builder 创建者Excavator 开挖工具GroundExcavator PitObject 坑洞对象 用于渲染开挖的结果 SampleCode:
//遮挡设置 occlusionHelper = arView.getOcclusionHelper(); occlusionHelper.init(0.36f) .setRenderMode(OcclusionHelper.RenderMode.NORMAL); //采用ARGeoPrism,构建“检测墙” ListroomBounds = Arrays.asList( new Point3D(-1, -1, -2), new Point3D(-1, 6, -2), new Point3D(6, 6, -2), new Point3D(6, -1, -2), new Point3D(-1, -1, -2) ); ARGeoPrism geoVerticalRegion = new ARGeoPrism(); geoVerticalRegion.setParentNode(arView); geoVerticalRegion.setRenderable(false);//不渲染出来,仅用作射线检测 geoVerticalRegion.addPart(roomBounds,6.0f); //创建开挖工具,在这之前,需确认AREffectView开启了遮挡设置 // Excavator
所有子类使用方法一致 excavatorWall = new WallExcavator(geoVerticalRegion); //坑洞纹理 Bitmap bitmap=null; Bitmap bitmap2=null; try { InputStream is = getApplicationContext().getAssets() .open("brown_mud_dry2.png"); bitmap= BitmapFactory.decodeStream(is); InputStream is2 = getApplicationContext().getAssets() .open("wall_texture.png"); bitmap2= BitmapFactory.decodeStream(is2); is.close(); is2.close(); } catch (IOException e) { } //创建坑洞渲染对象 pitWall = new PitObject(excavatorWall) .setTexture(bitmap,bitmap2); //在每一帧刷新时调用 (通常使用EffectView.addOnUpdateListener(EffectView.OnUpdateListener)
添加帧监听事件) arView.addOnUpdateListener(()->{ if (occlusionHelper.isEnabled()){ //desc-执行画面裁剪 ArrayListscreenPoint = null; if (excavatorWall ! WallExcavator -
枚举概要 枚举 说明 ExcavationParameter.ShapeType
程序包com.supermap.ar.areffect.excavator的说明
AR开挖分析工具模块。