Page 1 of 3

CloudCompare is displayed incorrectly.

Posted: Wed May 26, 2021 7:55 am
by suyufeng
hi!
In the CloudCompare code, some functions simply "return" and do not execute subsequent code.

For example, a piece of code in this picture.

I wonder if the statement after this'return' will still be executed? Or under what conditions they'll execute!
When I block them, there is no effect on my compiled cloudcompare!

I'm guessing this might be a later change that you made to stop executing subsequent code.

Thank you.

Re: CloudCompare is displayed incorrectly.

Posted: Wed May 26, 2021 3:16 pm
by WargodHernandez
No the code after a return statement will not execute if the return is.

This function is meant to echo or pass along a mouse wheel rotate event when there are more then one 3d windows and the camera link option is enabled.
Camera link will move all 3d windows at the same time while navigating.

Re: CloudCompare is displayed incorrectly.

Posted: Thu May 27, 2021 2:03 am
by suyufeng
thank you!
I guess I know what it does.
I want to know when the statement following'return' is executed in CloudCompare.

Re: CloudCompare is displayed incorrectly.

Posted: Thu May 27, 2021 7:41 am
by daniel
You need two 3D views AND to enable the 'Display > Camera link' option.

Re: CloudCompare is displayed incorrectly.

Posted: Thu May 27, 2021 8:33 am
by suyufeng
think you!!!
This solves my question, and I'd like to ask another question.
I'm in the middle of the secondary development of CloudCompare, and my current job is to constantly change the position of the camera to achieve the effect of dynamically displaying point clouds, just like your plug-in "Animation", I haven't been involved with C++ for a long time. Your code is a bit difficult to understand. Is there anything you can teach me?

Re: CloudCompare is displayed incorrectly.

Posted: Thu May 27, 2021 3:58 pm
by daniel
Well, CloudCompare is a complicated software... But the code is pretty standard C++. I guess at best we can answer questions :D

Re: CloudCompare is displayed incorrectly.

Posted: Fri May 28, 2021 3:09 am
by suyufeng
Ha ha ha ha!
There are so many questions to ask you.
Thank you for taking the time to respond to my post.

ccGLWindow* win = getActiveGLWindow();

You use this statement a lot, and I guess it's creating a form.But it doesn't feel like it's。

Can you give me an answer?

Re: CloudCompare is displayed incorrectly.

Posted: Fri May 28, 2021 7:04 am
by suyufeng
Oh! It's Friday. It's the weekend off again!
Take advantage of this time to ask a few more questions, hahaha!

My idea was to have the camera show the point cloud at my fixed position, and after a delay, show the point cloud at the next fixed point, but it won't, it will show the point cloud after the delay and do nothing before.
Could you give me some pointers?

Re: CloudCompare is displayed incorrectly.

Posted: Fri May 28, 2021 2:21 pm
by daniel
1) getActiveGLWindow simply returns a pointer to the active 3D view. This is the currently displayed/selected 3D view (as you can have several ones at the same time in CC)

2) Not sure to understand what you are trying to do (and how you do it) sorry. Maybe you should share some code?

Re: CloudCompare is displayed incorrectly.

Posted: Mon May 31, 2021 1:54 am
by suyufeng
I'm so sorry.
I can't share the code because of corporate confidentiality.
Please forgive me.
I mean I wanted to make the preview function of your qAnimation plug-in, I wanted to make it dynamic by constantly setting the camera position, which I did in pcl by constantly setting the camera position via PCLVisualizer. Now I want to implement it in cc, not as a plug-in.

Do you have anything to suggest? I know the setcamerapos function, but after I set the position, it took a while to set the other position, and it didn't do the trick I wanted.