Follow-up of 17a6b696e7
-> Fixed build when tech ENABLE_6DOF_CAMERA is disabled
This commit is contained in:
parent
7156ed9987
commit
da3cb30b7c
@ -502,16 +502,16 @@ void Camera::rotate_local_around_pivot(const Vec3d& rotation_rad, const Vec3d& p
|
|||||||
m_view_matrix.rotate(Eigen::AngleAxisd(rotation_rad(2), get_dir_forward()));
|
m_view_matrix.rotate(Eigen::AngleAxisd(rotation_rad(2), get_dir_forward()));
|
||||||
translate_world(center);
|
translate_world(center);
|
||||||
}
|
}
|
||||||
|
#endif // ENABLE_6DOF_CAMERA
|
||||||
|
|
||||||
double Camera::min_zoom() const
|
double Camera::min_zoom() const
|
||||||
{
|
{
|
||||||
#if ENABLE_6DOF_CAMERA
|
#if ENABLE_6DOF_CAMERA
|
||||||
return 0.7 * calc_zoom_to_bounding_box_factor(m_scene_box);
|
return 0.7 * calc_zoom_to_bounding_box_factor(m_scene_box);
|
||||||
#else
|
#else
|
||||||
return 0.7 * calc_zoom_to_bounding_box_factor(m_scene_box, (int)m_viewport[2], (int)m_viewport[3]);
|
return 0.7 * calc_zoom_to_bounding_box_factor(m_scene_box, m_viewport[2], m_viewport[3]);
|
||||||
#endif // ENABLE_6DOF_CAMERA
|
#endif // ENABLE_6DOF_CAMERA
|
||||||
}
|
}
|
||||||
#endif // ENABLE_6DOF_CAMERA
|
|
||||||
|
|
||||||
std::pair<double, double> Camera::calc_tight_frustrum_zs_around(const BoundingBoxf3& box) const
|
std::pair<double, double> Camera::calc_tight_frustrum_zs_around(const BoundingBoxf3& box) const
|
||||||
{
|
{
|
||||||
|
@ -146,10 +146,9 @@ public:
|
|||||||
|
|
||||||
// returns true if the camera z axis (forward) is pointing in the negative direction of the world z axis
|
// 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; }
|
bool is_looking_downward() const { return get_dir_forward().dot(Vec3d::UnitZ()) < 0.0; }
|
||||||
|
#endif // ENABLE_6DOF_CAMERA
|
||||||
double max_zoom() const { return 100.0; }
|
double max_zoom() const { return 100.0; }
|
||||||
double min_zoom() const;
|
double min_zoom() const;
|
||||||
#endif // ENABLE_6DOF_CAMERA
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// returns tight values for nearZ and farZ plane around the given bounding box
|
// returns tight values for nearZ and farZ plane around the given bounding box
|
||||||
|
Loading…
Reference in New Issue
Block a user