Skip to content

Commit e43d2e7

Browse files
committed
Fixing windows compile error
1 parent eabaa81 commit e43d2e7

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

GUI/Qt/Components/ViewPanel3D.cxx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -491,22 +491,14 @@ void ViewPanel3D::LoadCameraViewpoint(QString file)
491491
// Read the camera properties
492492
QJsonObject json_camera = json_main["camera"].toObject();
493493

494-
// QJsonArray to Vector3d
495-
Vector3d camPosition = read_json_array<3>(json_camera, "position");
496-
Vector3d camFocalPoint = read_json_array<3>(json_camera, "focal_point");
497-
Vector3d camViewUp = read_json_array<3>(json_camera, "view_up");
498-
Vector2d camClippingRange = read_json_array<2>(json_camera, "clipping_range");
499-
double camViewAngle = read_json_double(json_camera, "view_angle");
500-
double camParallelScale = read_json_double(json_camera, "parallel_scale");
501-
int camParallelProjection = read_json_bool(json_camera, "parallel_projection");
502-
503-
CameraState cam = { .position = camPosition,
504-
.focal_point = camFocalPoint,
505-
.view_up = camViewUp,
506-
.clipping_range = camClippingRange,
507-
.view_angle = camViewAngle,
508-
.parallel_scale = camParallelScale,
509-
.parallel_projection = camParallelProjection };
494+
CameraState cam;
495+
cam.position = read_json_array<3>(json_camera, "position");
496+
cam.focal_point = read_json_array<3>(json_camera, "focal_point");
497+
cam.view_up = read_json_array<3>(json_camera, "view_up");
498+
cam.clipping_range = read_json_array<2>(json_camera, "clipping_range");
499+
cam.view_angle = read_json_double(json_camera, "view_angle");
500+
cam.parallel_scale = read_json_double(json_camera, "parallel_scale");
501+
cam.parallel_projection = read_json_bool(json_camera, "parallel_projection");
510502

511503
m_Model->GetRenderer()->SetCameraState(cam);
512504

0 commit comments

Comments
 (0)