Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Gen3 geometry Portals #3501

Merged
merged 31 commits into from
Aug 29, 2024
Merged

Conversation

paulgessinger
Copy link
Member

@paulgessinger paulgessinger commented Aug 9, 2024

Part of #3502

This PR implements Portals. A portal connects two or more neighboring volumes. Each volume has a set of portals that describes which volumes lie behind the portal in that direction. Portals use associated portal links to perform lookups of target volumes. Each portal has two links, and a corresponding surface. One link is associated with the direction along the surface's normal vector, and one with the opposite direction.

Portals can be fused and merged.

Fusing is the combination of two portal linkson the same logical surfaces. The actual surface instances can be different, as long as they are geometrically equivalent (within numerical precistion). The resulting portal will have one portal along the shared surface's normal vector, and one opposite that vector.

   portal1   portal2
     +---+   +---+
     |   |   |   |
     |   |   |   |
<----+   | + |   +---->
     |   |   |   |
     |   |   |   |
     +---+   +---+

The input portals need to have compatible link loadout, e.g. one portal needs to have the along normal slot filled, and the other one needs to have the opposite normal slot filled. If
portals share a filled slot, the function throws an exception.

Merging is the complementary operation to the fusing of portals. To be able to merge portals, the surfaces of their associated links need to be mergeable, and the portal links need to be compatible. This means that both portals need to have a link along the portal surface normal, opposite the normal, or both. If the equipped links are opposite relative to one another (e.g. one along one opposite), the function will throw an exception.

           ^                     ^
           |                     |
    portal1|              portal2|
   +-------+-------+     +-------+-------+
   |               |  +  |               |
   +-------+-------+     +-------+-------+
           |                     |
           |                     |
           v                     v

This is a destructive operation on both portals, their links will be moved to produce merged links, which can fail if the portal links are not compatible

@paulgessinger paulgessinger added this to the v37.0.0 milestone Aug 9, 2024
@github-actions github-actions bot added the Component - Core Affects the Core module label Aug 9, 2024
@paulgessinger paulgessinger mentioned this pull request Aug 9, 2024
@paulgessinger paulgessinger force-pushed the feat/gen3-portals branch 2 times, most recently from ed3fd39 to 3b3fcea Compare August 12, 2024 17:02
@paulgessinger paulgessinger force-pushed the feat/gen3-portals branch 15 times, most recently from a1a6dc4 to 2f56e20 Compare August 26, 2024 16:22
andiwand
andiwand previously approved these changes Aug 27, 2024
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

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

A couple of comments and questions - nothing critical

Core/include/Acts/Geometry/Portal.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Geometry/Portal.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Geometry/Portal.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Geometry/Portal.hpp Show resolved Hide resolved
Core/include/Acts/Geometry/Portal.hpp Show resolved Hide resolved
Core/include/Acts/Geometry/Portal.hpp Outdated Show resolved Hide resolved
Core/src/Geometry/Portal.cpp Outdated Show resolved Hide resolved
Core/src/Geometry/Portal.cpp Outdated Show resolved Hide resolved
The `fill` method accepts a volume and creates a trivial portal link on
the link that is not filled yet in the portal (along or opposite).
andiwand
andiwand previously approved these changes Aug 28, 2024
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Core/src/Geometry/Portal.cpp Outdated Show resolved Hide resolved
Core/src/Geometry/Portal.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@asalzburger asalzburger left a comment

Choose a reason for hiding this comment

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

Only got to read this now, very clean change, I like it!

Copy link

sonarcloud bot commented Aug 29, 2024

@kodiakhq kodiakhq bot merged commit 4569230 into acts-project:main Aug 29, 2024
42 checks passed
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Aug 29, 2024
@andiwand andiwand modified the milestones: next, v36.3.0 Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Fails Athena tests This PR causes a failure in the Athena tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants