mirror of
https://github.com/leozide/leocad
synced 2025-02-05 08:45:55 +01:00
Set fov and clip planes before viewpoint so zoom extents is correct.
This commit is contained in:
parent
fd92710cf8
commit
9a7e256c72
1 changed files with 13 additions and 13 deletions
|
@ -718,6 +718,19 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ActiveView->SetProjection(Orthographic);
|
||||||
|
|
||||||
|
if (SetFoV)
|
||||||
|
ActiveView->GetCamera()->m_fovy = FoV;
|
||||||
|
|
||||||
|
if (SetZPlanes)
|
||||||
|
{
|
||||||
|
lcCamera* Camera = ActiveView->GetCamera();
|
||||||
|
|
||||||
|
Camera->m_zNear = ZNear;
|
||||||
|
Camera->m_zFar = ZFar;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ViewpointName.isEmpty())
|
if (!ViewpointName.isEmpty())
|
||||||
{
|
{
|
||||||
if (ViewpointName == QLatin1String("front"))
|
if (ViewpointName == QLatin1String("front"))
|
||||||
|
@ -756,19 +769,6 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
||||||
lcVector3(CameraPosition[3], CameraPosition[4], CameraPosition[5]),
|
lcVector3(CameraPosition[3], CameraPosition[4], CameraPosition[5]),
|
||||||
lcVector3(CameraPosition[6], CameraPosition[7], CameraPosition[8]));
|
lcVector3(CameraPosition[6], CameraPosition[7], CameraPosition[8]));
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveView->SetProjection(Orthographic);
|
|
||||||
|
|
||||||
if (SetFoV)
|
|
||||||
ActiveView->GetCamera()->m_fovy = FoV;
|
|
||||||
|
|
||||||
if (SetZPlanes)
|
|
||||||
{
|
|
||||||
lcCamera* Camera = ActiveView->GetCamera();
|
|
||||||
|
|
||||||
Camera->m_zNear = ZNear;
|
|
||||||
Camera->m_zFar = ZFar;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SaveImage)
|
if (SaveImage)
|
||||||
|
|
Loading…
Add table
Reference in a new issue