Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix plane to plane transform and test. #375

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

d3ssy
Copy link
Collaborator

@d3ssy d3ssy commented Oct 19, 2021

What type of PR is this? (check all applicable)

  • 🐛 Bug Fix

Description

Rewrites plane to plane transform logic and test with arbitrary planes.

Related Tickets & Documents

Fixes #372

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📓 docs
  • 🙅 no documentation needed

@d3ssy d3ssy added the bug 🐛 Issues describing a bug or pull requests fixing a bug. label Oct 19, 2021
@d3ssy d3ssy requested a review from sonomirco October 19, 2021 10:44
var mapATransposed = mapA.Transpose();
Matrix result = translation1 * mapB * mapATransposed * translationA;
var xForm = new Transform();
xForm.Clear();
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should have a constructor from a matrix :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was actually going to add an implicit operator to convert to matrix from plane and transform, but I think we may as well refactor transform specifically into a 4x4 matrix with individual properties for each value as we've always discussed and keep it in a separate issue.

// Mapping x0 to x1, y0 to y1, z0 to z1
Transform map = map0 * map1;
return translation1 * map * translation0;
var translation1 = new Matrix();
Copy link
Collaborator

Choose a reason for hiding this comment

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

translation1 and translationA, could be translationPt0ToOrigin and translationOriginToPt1?
I am fine also with translation1 and translationA, but why 1 and A? ahahh

@d3ssy d3ssy merged commit e9ac03b into develop Oct 19, 2021
@sonomirco sonomirco deleted the dev/guma/fix-plane-to-plane-transformation branch January 3, 2023 03:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🐛 Issues describing a bug or pull requests fixing a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PlaneToPlane doesn't provide the correct transformation.
2 participants