How to get coordinate information in Viewer?

how to get coordinate information in Viewer?

Apr.21,2022

depends on your specific needs
1. Get the click position (click on the component to react)

// h5
console.log(" >LJason< :",viewer.clientToWorld(event.offsetX,event.offsetY,false).intersectPoint);

2. Get the component center point

// 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]);

hope to be useful ~ good luck

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b360de-4d67f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b360de-4d67f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?