Hi,
I want to add box primitive in the point cloud, and the center of the box is the mouse position. So how can I get the position(X,Y,Z) of the mouse in the point cloud?
Thanks.
get the mouse position in the point coud
Re: get the mouse position in the point coud
To get the position of the mouse relatively to a 3D view, you can connect a slot to the 'mouseMoved' event of the 3D view.
Then you can reproject a 2D position in 3D by using the 'ccGLCameraParameters' structure of the same window (the 'unproject' method notably).
But mind that the 'z' coordinate is arbitrary! You might have to be a little more clever here to get a proper position.
Then you can reproject a 2D position in 3D by using the 'ccGLCameraParameters' structure of the same window (the 'unproject' method notably).
But mind that the 'z' coordinate is arbitrary! You might have to be a little more clever here to get a proper position.
Daniel, CloudCompare admin