ENH: preview: refine the logic to switch camera view

when switch between preview and view3D,
if the screen center is on the plate
don't change to the plate view

Change-Id: I16b8815ad9b10a7cea174faa6a16bb9e582a77c3
This commit is contained in:
lane.wei 2022-07-28 19:58:06 +08:00 committed by Lane.Wei
parent 92ad7ff1d0
commit 6a08c2d509
4 changed files with 16 additions and 16 deletions

View file

@ -909,6 +909,10 @@ public:
bool is_object_sinking(int object_idx) const;
// Convert the screen space coordinate to an object space coordinate.
// If the Z screen space coordinate is not provided, a depth buffer value is substituted.
Vec3d _mouse_to_3d(const Point& mouse_pos, float* z = nullptr);
private:
bool _is_shown_on_screen() const;
@ -981,10 +985,6 @@ private:
void _update_volumes_hover_state();
// Convert the screen space coordinate to an object space coordinate.
// If the Z screen space coordinate is not provided, a depth buffer value is substituted.
Vec3d _mouse_to_3d(const Point& mouse_pos, float* z = nullptr);
// Convert the screen space coordinate to world coordinate on the bed.
Vec3d _mouse_to_bed_3d(const Point& mouse_pos);