Repository navigation
Conversation
… without moving the camera Home pushes the camera's near clip away from the eye by a twentieth of its distance to the target, End brings it back (a hundredth with Shift), Alt + wheel steps it by a fiftieth, and Ctrl + Home or End takes it away. The camera and its target stay put. The slice view shows the plane without the near clip and gives it back on leaving. The camera menu shows the near clip while it is on. The step is ViewerDetail::steppedNearClip(), never below 0 and snapping to 0 within a thousandth of a step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012mR37bzMSJWYPpFgLhy9sk
Owner
Author
|
@claude review |
|
Claude finished @rmrsk's task in 29s —— View job Review of #370: Viewer near-clip keysNo blocking findings. I read the diff and the surrounding handler code. I did not build or run anything, and there is no display here, so the keys in a window are untested. Checked and correct
Nits and questions (non-blocking)
Per CLAUDE.md, before hand-over
|
…e same code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012mR37bzMSJWYPpFgLhy9sk
rmrsk
marked this pull request as ready for review
November 22, 2026 14:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #258
Background
The renderer's camera has a near clip (
Camera::m_nearClip: every camera ray starts that far from the eye), but no viewer key set it, so the only way to see through the front of a model without moving the camera was to cut it with the section plane or to see through picked surfaces one at a time. #258's last comment asks for keys for it.Solution
Viewer keys only, on the existing camera field; no API change.
ViewerDetail::steppedNearClip()(outside the SDL-only part ofEBGeometry_ViewerImplem.hpp, a template, so it compiles into no other translation unit): never below 0, and snapping to 0 within a thousandth of a step, so stepping forward and back (or zooming in between) returns to no clip exactly.Viewer.rst; theTestRenderrow ofTestingLocally.rst.Side-effects
None for programs: no signature or settings change. Home, End and Alt + wheel were unbound in the viewer and in ebgstudio.
Alternative solutions
Settings::m_hidden), region and subdomain hiding, and surface groups already cover the need, and model-level hiding fits the ImGui studio (ebgstudio on Dear ImGui, a smaller library viewer, and .ebg writing in the library (long term, 2027) #329), which holds the expression, better.Performance
Host receipt green,
Performance/receipts/near-clip-a2c485fc.md: every probe compiled to the same code on both sides (332 cases, none run), as the change is viewer-only (the window code compiles only with SDL2, and the new helper is a template no probe instantiates). No device section: no code a device runs changed.Where to look
Source/EBGeometry_ViewerImplem.hpp:steppedNearClip(), theSDLK_HOME/SDLK_ENDcase, the Alt branch of the wheel handler, the slice view's entry (Z), the camera menu line.ctest --preset debug(822 tests) with the SDL2 viewer compiled;TestRenderunderdebug-sanand underrelease-testwith both precisions; the Sphinx HTML build and the Doxygen hook.Reviewer checklist (to be completed by a human)
@claude review.🤖 Generated with Claude Code
https://claude.ai/code/session_012mR37bzMSJWYPpFgLhy9sk