Skip to content

Boundless panel intersection#43

Merged
dimitrivlachos merged 6 commits into
mainfrom
boundless_panel_intersection
Apr 23, 2026
Merged

Boundless panel intersection#43
dimitrivlachos merged 6 commits into
mainfrom
boundless_panel_intersection

Conversation

@dimitrivlachos
Copy link
Copy Markdown
Collaborator

Panel::get_ray_intersection checks whether the computed intersection
lies within the physical extent of the panel before returning a result.
This is correct for determining whether a reflection is genuinely
recorded, but is too restrictive when the intersection is needed
regardless of whether it falls within the detector boundary, like when
computing bounding boxes.

This PR adds a companion method that performs the same
ray-to-panel-frame projection but omits the bounds check, returning the
mm coordinate for any forward-facing ray.

  • Add Panel::get_ray_intersection_unbounded, which projects s₁ into
    the panel frame via D·s₁ and returns the mm intersection for any ray
    with a positive depth component, without checking against
    image_size_mm_.
  • Refactor get_ray_intersection to delegate to
    get_ray_intersection_unbounded and apply the bounds check on the
    result, eliminating duplicated projection arithmetic.
  • Fix a typo in the return comment of get_ray_intersection (mmm
    mm).

This allows callers that previously had to replicate the projection
arithmetic inline to use the Panel API directly, while preserving the
bounds-checked behaviour of the existing method for all current calls.

Copy link
Copy Markdown
Contributor

@jbeilstenedmands jbeilstenedmands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dimitrivlachos dimitrivlachos merged commit dc76852 into main Apr 23, 2026
5 checks passed
@dimitrivlachos dimitrivlachos deleted the boundless_panel_intersection branch April 23, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants