| 71 | } |
| 72 | |
| 73 | std::array<AffineXf3d, 4> PointAccumulator::get4BasicXfs() const |
| 74 | { |
| 75 | Vector3d centroid; |
| 76 | Matrix3d eigenvectors; |
| 77 | Vector3d eigenvalues; |
| 78 | [[maybe_unused]] bool ok = getCenteredCovarianceEigen( centroid, eigenvectors, eigenvalues ); |
| 79 | assert( ok ); |
| 80 | |
| 81 | std::array<AffineXf3d, 4> res; |
| 82 | res[0].b = res[1].b = res[2].b = res[3].b = centroid; |
| 83 | |
| 84 | const auto exy = cross( eigenvectors.x, eigenvectors.y ); |
| 85 | res[0].A = Matrix3d::fromColumns( eigenvectors.x, eigenvectors.y, exy ); |
| 86 | res[1].A = Matrix3d::fromColumns( eigenvectors.x, -eigenvectors.y, -exy ); |
| 87 | res[2].A = Matrix3d::fromColumns( -eigenvectors.x, eigenvectors.y, -exy ); |
| 88 | res[3].A = Matrix3d::fromColumns( -eigenvectors.x, -eigenvectors.y, exy ); |
| 89 | |
| 90 | return res; |
| 91 | } |
| 92 | |
| 93 | std::array<AffineXf3f, 4> PointAccumulator::get4BasicXfs3f() const |
| 94 | { |
no test coverage detected