mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: zooming at mouse position
https://github.com/bambulab/BambuStudio/issues/1321 Change-Id: Ifa5c2b2931a5d80c3e5e5cc05eda76263a5ac570
This commit is contained in:
parent
01bb20e4e1
commit
3f2ee4062b
3 changed files with 25 additions and 2 deletions
|
@ -20,6 +20,7 @@ double Camera::FrustrumMinZRange = 50.0;
|
|||
double Camera::FrustrumMinNearZ = 100.0;
|
||||
double Camera::FrustrumZMargin = 10.0;
|
||||
double Camera::MaxFovDeg = 60.0;
|
||||
double Camera::ZoomUnit = 0.1;
|
||||
|
||||
std::string Camera::get_type_as_string() const
|
||||
{
|
||||
|
@ -52,6 +53,12 @@ void Camera::select_next_type()
|
|||
set_type((EType)next);
|
||||
}
|
||||
|
||||
void Camera::translate(const Vec3d& displacement) {
|
||||
if (!displacement.isApprox(Vec3d::Zero())) {
|
||||
m_view_matrix.translate(-displacement);
|
||||
}
|
||||
}
|
||||
|
||||
void Camera::set_target(const Vec3d& target)
|
||||
{
|
||||
//BBS do not check validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue