Six degrees of freedom camera - 1st installment

This commit is contained in:
Enrico Turri 2020-01-15 12:49:34 +01:00
parent 536514ff03
commit 62e60bcb43
8 changed files with 245 additions and 2 deletions

View file

@ -2004,7 +2004,11 @@ void Selection::render_sidebar_layers_hints(const std::string& sidebar_field) co
const float max_y = box.max(1) + Margin;
// view dependend order of rendering to keep correct transparency
#if ENABLE_6DOF_CAMERA
bool camera_on_top = wxGetApp().plater()->get_camera().is_looking_downward();
#else
bool camera_on_top = wxGetApp().plater()->get_camera().get_theta() <= 90.0f;
#endif // ENABLE_6DOF_CAMERA
float z1 = camera_on_top ? min_z : max_z;
float z2 = camera_on_top ? max_z : min_z;