-
Notifications
You must be signed in to change notification settings - Fork 173
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
Conversation
ed3fd39
to
3b3fcea
Compare
a1a6dc4
to
2f56e20
Compare
This reverts commit 8d8e74a.
remove todo fixup: Remove ConstructionFromVolume
There was a problem hiding this 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
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this 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!
Quality Gate passedIssues Measures |
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.
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.
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