QoL: 3D navigator (#4181)

* Initial integration of ImGuizmo

* Fix mouse capture

* Fix frame update

* Update face color

* Show current camera rotation

* Fix coord mapping

* Update camera rotation from 3d navigator

* Use orthographic

* Render axis

* Make the axis color lighter if at back

* Show axis label

* Fix linux build

* Move to separate method

* Refine

* Add option to show/hide 3d navigator

* Add license info

* Handle dpi scaling

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox
2024-02-27 21:57:31 +08:00
committed by GitHub
parent 4991a3d312
commit bf4d59a676
15 changed files with 3695 additions and 1 deletions

View File

@@ -146,6 +146,8 @@ public:
// rotate the camera around three axes parallel to the camera local axes and passing through m_target
void rotate_local_around_target(const Vec3d& rotation_rad);
void set_rotation(const Transform3d& rotation);
// returns true if the camera z axis (forward) is pointing in the negative direction of the world z axis
bool is_looking_downward() const { return get_dir_forward().dot(Vec3d::UnitZ()) < 0.0; }