Skip to content

Commit

Permalink
redesign: remove basis reflection code
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Feb 20, 2024
1 parent 9cd1225 commit 44cf0c4
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/xs3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,7 @@ std::tuple<Vec3, Vec3> create_orthonormal_basis(const Vec3& normal) {

// try to sort and reflect the bases to approximate
// a standard basis. First, make basis1 more like the
// earlier letter of XY, XZ, or YZ and if its
// pointed into the negatives, reflect it into
// the positive direction.
// earlier letter of XY, XZ, or YZ

int argmax1 = basis1.abs().argmax();
int argmax2 = basis2.abs().argmax();
Expand All @@ -713,21 +711,6 @@ std::tuple<Vec3, Vec3> create_orthonormal_basis(const Vec3& normal) {
std::swap(basis1, basis2);
}

// Vec3 positive_direction = Vec3(1,1,1);

// Vec3 zone = positive_direction;
// if (normal.dot(positive_direction) < 0) {
// zone = -positive_direction;
// }

// if (basis1.dot(zone) < 0) {
// basis1 = -basis1;
// }

// if (basis2.dot(zone) < 0) {
// basis2 = -basis2;
// }

return std::tuple(basis1, basis2);
}

Expand Down

0 comments on commit 44cf0c4

Please sign in to comment.