Hey,
is there a high level Interface to draw to the screen of CloudCompare?
As discussed here I would like to fix the inconsistency of the CoR. Looking at the Code I expect to draw the pivot it seems to be visualized using OpenGL 2.1 directly. Is there no Interface to abstract from that to draw "primitive" geometry?
I would love a small guide how drawing to the screen is intended to be handled.
Interface for drawing to screen
Re: Interface for drawing to screen
Yes, all legacy OpenGL code :-D
Everything starts in ccGLWindowInterface::draw3D (https://github.com/CloudCompare/CloudCo ... .cpp#L4829)
The 3D entities are displayed first (recursively). Then the CoR ('pivot' in the code) can be automatically picked depending on the current display option), and then the pivot symbol is displayed: https://github.com/CloudCompare/CloudCo ... .cpp#L5008
Mind that this only applies to the standard mode.
The center of rotation for the Rotate/translate tool is managed differently. You can track it via the 'INTERACT_TRANSFORM_ENTITIES' flag. Basically, any interaction with the screen is forwarded to the ccGraphicalTransformationTool class in this mode:
https://github.com/CloudCompare/CloudCo ... .cpp#L6620
https://github.com/CloudCompare/CloudCo ... l.cpp#L868
And the rotation matrix is applied about the 'm_rotationCenter' member of this last class.
Everything starts in ccGLWindowInterface::draw3D (https://github.com/CloudCompare/CloudCo ... .cpp#L4829)
The 3D entities are displayed first (recursively). Then the CoR ('pivot' in the code) can be automatically picked depending on the current display option), and then the pivot symbol is displayed: https://github.com/CloudCompare/CloudCo ... .cpp#L5008
Mind that this only applies to the standard mode.
The center of rotation for the Rotate/translate tool is managed differently. You can track it via the 'INTERACT_TRANSFORM_ENTITIES' flag. Basically, any interaction with the screen is forwarded to the ccGraphicalTransformationTool class in this mode:
https://github.com/CloudCompare/CloudCo ... .cpp#L6620
https://github.com/CloudCompare/CloudCo ... l.cpp#L868
And the rotation matrix is applied about the 'm_rotationCenter' member of this last class.
Daniel, CloudCompare admin