修改了一些bug

dev-VirtualTexture
yang.yongquan 2023-02-10 18:28:59 +08:00
parent 39aa4a5902
commit ad3fe46efe
1 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,9 @@ GLuint BvhTree::getBvhNodeNum() {
void BvhTree::buildBvhTree(BvhTreeData initBound[], int len, GLuint transformParam) {
tot = 0; transform = transformParam;
for (int i = 0; i < len; i++) {
initBound->bound = initBound->boundWithRotation();
}
root = subBvhTree(initBound, 0, len-1);
}
@ -19,9 +22,9 @@ QVector4D BvhTree::Union(QVector4D a, QVector4D b) {
}
QVector4D BvhTree::calcBound(BvhTreeData initBound[], int l, int r) {
QVector4D res = initBound[l].boundWithRotation();
QVector4D res = initBound[l].bound;
for (int i = l + 1; i <= r; i++) {
res = Union(res, initBound[i].boundWithRotation());
res = Union(res, initBound[i].bound);
}
return res;
}