Hello,
Which fonction can I use to get or set the property(x,y,z,scalar) of a point 3D ?
Thank you
get properties of point 3D
Re: get properties of point 3D
Simply 'shift + click' on the point. Or you can also use the Point Picking tool (http://www.cloudcompare.org/doc/wiki/in ... nt_picking).
Daniel, CloudCompare admin
Re: get properties of point 3D
Thanks for your response. Could you tell me which classes and fuctions have you used to develop these above?daniel wrote:Simply 'shift + click' on the point. Or you can also use the Point Picking tool (http://www.cloudcompare.org/doc/wiki/in ... nt_picking).
Re: get properties of point 3D
Well, the point information is stored in the ccPointCloud class. And the label corresponds to the cc2dLabel class. You can see how the second accesses to the data of the first one.
Daniel, CloudCompare admin
Re: get properties of point 3D
@DanielTo 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.
I cite here your words.
I am not sure if I have understood your idea.
With a mouse click, we get its position 2D. Then, we calculate its corresponding cloud point through the perspective relation and get its position 3D.
Is it right ?
Re: get properties of point 3D
It depends on what you are trying to achieve.
The citation was to answer a question where the user wanted to know the 3D position corresponding to a click anywhere on the 3D view (which is in fact a 3D line and not a single point).
The other possibility is to perform 'point picking'. In this case we look for the points that are displayed near the clicked point (if any). This is done automatically by ccGlWindow. And there's a dedicated signal emitted by the window in this case.
The citation was to answer a question where the user wanted to know the 3D position corresponding to a click anywhere on the 3D view (which is in fact a 3D line and not a single point).
The other possibility is to perform 'point picking'. In this case we look for the points that are displayed near the clicked point (if any). This is done automatically by ccGlWindow. And there's a dedicated signal emitted by the window in this case.
Daniel, CloudCompare admin
Re: get properties of point 3D
@Daniel Thank you, I've got it.