qq_遁去的一_1
看你具体需求1.获取点击位置(鼠标点到构件才会有反应)// 绑定到h5点击事件console.log(" >LJason< 日志:点击位置",viewer.clientToWorld(event.offsetX,event.offsetY,false).intersectPoint);2.获取构件中心点// 下面方法拿到构件的AABB包围盒的两个点,中心点算一下吧var tree = viewer.model.getData().instanceTree;var tmpBox = new Float32Array(6);
tree.getNodeBox(dbId, tmpBox);var min = new THREE.Vector3(tmpBox[0], tmpBox[1], tmpBox[2]);var max = new THREE.Vector3(tmpBox[3], tmpBox[4], tmpBox[5]);希望有用~~~好运