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

WIP: Vertex reflection along a plane #129

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

zilmarinen
Copy link
Contributor

Description

Work in progress proposal to add supporting methods to reflect Mesh and Polygon vertices along a given Plane.

This is currently a partial implementation as the reflected vertex normal yields incorrect results.

Discussion

I have implemented the appropriate methods for reflecting the vertex positions but the calculations used to determine the reflected normal of the plane are currently incorrect. This is most likely due to my lack of comprehension of the concepts discussed here and how this should be implemented. This requires further discussion.

The ordering of the polygon vertices is reversed using .inverted() which I believe to be correct but this feels a little like a code smell. Reversing the ordering feels intuitive to me as the polygons are mirrored 🤷‍♂️

Basic coverage for reflecting a quad has been added to the unit test suite but this will likely need additional tests for polygons which are coplanar / intersecting. I will bolster these further if there is any interest in merging this PR.

@zilmarinen zilmarinen marked this pull request as draft August 30, 2024 11:02
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.

1 participant