Fixes for transform and mapped item reuse in taxonomy

This commit is contained in:
Thomas Krijnen
2020-07-09 22:09:54 +02:00
parent 0e2bac5e3b
commit 6d59e6ea90
7 changed files with 162 additions and 109 deletions
+4 -2
View File
@@ -89,6 +89,8 @@ namespace {
bool compare(const collection& a, const collection& b);
bool compare(const extrusion& a, const extrusion& b) {
// @todo extrusions can also have non-identity matrices right? perhaps it's time
// for a dedicated transform node and not on the abstract geom_item.
const int order[3] = {
less_to_order(a.basis, b.basis),
less_to_order(a.direction, b.direction),
@@ -211,8 +213,8 @@ namespace {
}
return a_lt_b;
}
// Vectors equal.
return false;
// Vectors equal, compare matrix (in case of mapped items).
return compare(a.matrix, b.matrix);
} else {
return a.children.size() < b.children.size();
}