View navigation improvements: drag limits (per view type) and generic

recentering function to restore default view and adjust it to display
the entire scene (right mouse double clic).
This commit is contained in:
brunoherbelin
2020-07-12 00:30:32 +02:00
parent e43f56b123
commit bcc800e758
6 changed files with 133 additions and 22 deletions

View File

@@ -28,8 +28,8 @@ public:
inline bool isNull() const { return mMin.x > mMax.x || mMin.y > mMax.y || mMin.z > mMax.z;}
inline glm::vec3 min() const { return mMin; }
inline glm::vec3 max() const { return mMax; }
glm::vec3 center() const;
glm::vec3 scale() const;
glm::vec3 center(bool ignore_z = true) const;
glm::vec3 scale(bool ignore_z = true) const;
bool intersect(const AxisAlignedBoundingBox& bb, bool ignore_z = true) const;
bool contains(const AxisAlignedBoundingBox& bb, bool ignore_z = true) const;
bool contains(glm::vec3 point, bool ignore_z = true) const;