12 #ifndef BEMBEL_SRC_DUFFYTRICK_COMPAREELEMENTS_HPP_
13 #define BEMBEL_SRC_DUFFYTRICK_COMPAREELEMENTS_HPP_
16 namespace DuffyTrick {
25 Eigen::Vector3i retval;
28 if (std::addressof(e1) == std::addressof(e2)) {
36 *dist = *dist >= 0 ? *dist : 0;
38 if (*dist > .5 / (1 << e1.
level_)) {
45 for (
auto rot1 = 0; rot1 < 4; ++rot1)
46 for (
auto rot2 = 0; rot2 < 4; ++rot2)
53 }
else if (e1.
vertices_[(rot1 + 1) % 4] ==
55 retval << rot1, (rot2 + 3) % 4, 3;
58 retval << rot1, rot2, 4;
The ElementTreeNode corresponds to an element in the element tree.
int level_
element id with respect to the level
std::vector< int > vertices_
neighbouring elements indices
Eigen::Vector3d midpoint_
indices of the vertices
Eigen::Vector3i compareElements(const ElementTreeNode &e1, const ElementTreeNode &e2, double *dist)
Compares two elements for similarities and determines, how the elements have to be rotated to move th...
Routines for the evalutation of pointwise errors.