Open GurveerSohal opened 10 months ago
Did you try reset view
in context menu?
Did you try
reset view
in context menu?
Yes, but the centre of rotation seems to be fixed away from the point cloud itself. Large point clouds work fine if we change their coordinates to be centred around the centre of the circle ruler
'reset view' simply computes the centroid of points as the center, you can modify it to meet your needs, search resetview in editor.js
On Tue, Aug 22, 2023, 23:09 Gurveer Sohal @.***> wrote:
Did you try reset view in context menu?
Yes, but the centre of rotation seems to be fixed away from the point cloud itself. Large point clouds work fine if we change their coordinates to be centred around the centre of the circle ruler
— Reply to this email directly, view it on GitHub https://github.com/naurril/SUSTechPOINTS/issues/164#issuecomment-1688380517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKCDSF57PSPDTDKXW4WK3XWTDR3ANCNFSM6AAAAAA3Y2Y5E4 . You are receiving this because you commented.Message ID: @.***>
I saw that, but is there anywhere you define the centre of rotation for the camera itself?
you can set it when the main camera is initialized
On Wed, Aug 23, 2023, 00:11 Gurveer Sohal @.***> wrote:
I saw that, but is there anywhere you define the centre of rotation for the camera itself?
— Reply to this email directly, view it on GitHub https://github.com/naurril/SUSTechPOINTS/issues/164#issuecomment-1688507942, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKCDQSK54HNGXJS6AZ46DXWTK27ANCNFSM6AAAAAA3Y2Y5E4 . You are receiving this because you commented.Message ID: @.***>
Thanks!
When you pan using right click, it changes the centre of rotation (we checked using a console log in view.render()). I saw that the right click event is handled in handle_right_click() in editor.js, but I don't see where the drag event is handled. Can you please tell me where it is?
the camera operations including pan
are handled by OrbitControls
Thanks! We found that ussing the following:
this.viewManager.mainView.orbit.target.set(pos.x, pos.y, center.z);
in resetView() results in the desired behaviour for changing the center of rotation. (Changing the z value from 0 to center.z).
However, using any of the following:
this.viewManager.mainView.orbit.target.set(center.x, center.y, center.z);
this.viewManager.mainView.orbit.target.set(pos.x, pos.y, pos.z);
results in some problems, we are unsure of why yet.
Is there a way to change the centre of rotation for the loaded pointcloud?
If I have a large point cloud, it's hard to navigate that because the centre of rotation seems to be fixed. Also, if the coordinates of the pointcloud are far from the centre, it's hard to rotate too.
Is there anywhere in the code I can get started on changing this?