Compare commits

..

No commits in common. "de0f8f60097dfd81ed9d444fe25f1e081a99ac4e" and "a4a1b2984ec5c9ddaf4561757f9d1128cd870fc4" have entirely different histories.

1 changed files with 7 additions and 19 deletions

View File

@ -112,8 +112,10 @@ void ShortCutTree::generateShortCutSegment(ShortCutNode& nowTreeNode) {
}
for (auto& iter : pointSet) {
nowTreeNode.lineSet.push_back(numLine);
lineIndexs.push_back((iter.first << 16) + iter.first);
lineIndexs.push_back((iter.second << 16) + iter.second);
lineIndexs.push_back(iter.first);
lineIndexs.push_back(iter.first);
lineIndexs.push_back(iter.second);
lineIndexs.push_back(iter.second);
numLine++;
}
}
@ -147,28 +149,14 @@ bool ShortCutTree::handleShortCutNode(ShortCutNode& fa, ShortCutNode& nowTreeNod
}
void ShortCutTree::simplifyLineVector() {
bool canPut = false;
GLuint index = 0;
numLine = allLines.size();
for (auto& nowLine : allLines) {
PointVector pointVector = nowLine->toPointVector();
canPut = false;
index = 0;
for (Point& p : pointVector) {
int pointIndex = getPointIndex(p);
if (pointVector.size() == 2) {
index = (pointIndex << 16) + pointIndex;
lineIndexs.push_back(index);
}
else {
index <<= 16;
index += pointIndex;
if (canPut) {
lineIndexs.push_back(index);
index = 0;
}
canPut = !canPut;
}
lineIndexs.push_back(pointIndex);
if (pointVector.size() == 2)
lineIndexs.push_back(pointIndex);
}
}
for (auto& nowTreeNode : restOfTreeNodes) {