Update nodes ordering algorithm
parent
18b339d9d7
commit
d27c3fb313
|
@ -124,16 +124,16 @@ void Builder::layoutNodes()
|
||||||
const auto &choosenAxis = dots[0].second;
|
const auto &choosenAxis = dots[0].second;
|
||||||
switch (choosenAxis) {
|
switch (choosenAxis) {
|
||||||
case 0: // x
|
case 0: // x
|
||||||
if (headNode.position.x() * headNode.position.x() < tailNode.position.x() * tailNode.position.x())
|
if (headNode.position.x() * headNode.position.x() > tailNode.position.x() * tailNode.position.x())
|
||||||
needReverse = true;
|
needReverse = true;
|
||||||
break;
|
break;
|
||||||
case 1: // y
|
case 1: // y
|
||||||
if (headNode.position.y() * headNode.position.y() < tailNode.position.y() * tailNode.position.y())
|
if (headNode.position.y() * headNode.position.y() > tailNode.position.y() * tailNode.position.y())
|
||||||
needReverse = true;
|
needReverse = true;
|
||||||
break;
|
break;
|
||||||
case 2: // z
|
case 2: // z
|
||||||
default:
|
default:
|
||||||
if (headNode.position.z() * headNode.position.z() < tailNode.position.z() * tailNode.position.z())
|
if (headNode.position.z() * headNode.position.z() > tailNode.position.z() * tailNode.position.z())
|
||||||
needReverse = true;
|
needReverse = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue