mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
ifcviewer: move camera + surface-geom state into ViewportCore (#84-g)
Move the camera/projection/clear-color fields that buildViewProj, updateFrameUniforms, the cull screen-area projector, and the bonsai- side cameraState/setCamera/viewAll surface depend on. Same alias pattern; no method bodies move in this commit — the next one moves the camera math methods now that all their state is in core. State moved (12 fields): int configured_w_, configured_h_ float camera_target_[3], camera_distance_ float camera_yaw_deg_, camera_pitch_deg_, camera_fov_y_deg_ float camera_near_, camera_far_ bool projection_ortho_ Eigen::Vector4f background_color_ ViewportWindow keeps reference aliases for each (including a proper `float (&camera_target_)[3]` reference-to-array binding) so the ~150 call sites that touch camera state stay unchanged. Aliases collapse when their owning methods migrate. Builds: desktop / bonsai / web all green. Tests 100/100.
This commit is contained in:
@@ -608,7 +608,18 @@ ViewportWindow::ViewportWindow(QWindow* parent)
|
||||
next_model_id_ (core_.next_model_id_),
|
||||
next_object_id_ (core_.next_object_id_),
|
||||
federated_false_origin_meters_(core_.federated_false_origin_meters_),
|
||||
wgpu_initialized_(core_.wgpu_initialized_) {
|
||||
wgpu_initialized_(core_.wgpu_initialized_),
|
||||
configured_w_ (core_.configured_w_),
|
||||
configured_h_ (core_.configured_h_),
|
||||
camera_target_ (core_.camera_target_),
|
||||
camera_distance_(core_.camera_distance_),
|
||||
projection_ortho_(core_.projection_ortho_),
|
||||
camera_yaw_deg_ (core_.camera_yaw_deg_),
|
||||
camera_pitch_deg_(core_.camera_pitch_deg_),
|
||||
camera_fov_y_deg_(core_.camera_fov_y_deg_),
|
||||
camera_near_ (core_.camera_near_),
|
||||
camera_far_ (core_.camera_far_),
|
||||
background_color_(core_.background_color_) {
|
||||
// wgpu doesn't need a GL context; we just need a real native window
|
||||
// whose backing layer matches the GPU API wgpu will drive.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user