http://potree.org/potree/examples/cesium_retz.html
In this example they use function toCes to convert potree camera position into Cesium Projection
let toCes = (pos) => {
let xy = [pos.x, pos.y];
let height = pos.z;
let deg = window.toMap.forward(xy);
let cPos = Cesium.Cartesian3.fromDegrees(...deg, height);
return cPos;
};
``
I am finding vice-versa for this function.
I have written than function but that does not giving me correct position
let toPot = (pos) => {
let xy = [pos.x,pos.y]
pPos = window.toScene.forward(xy);
pPos = new THREE.Vector3(…pPos, pos.z);
return pPos;
}
``