Continuation.

This commit is contained in:
Yoann 2011-10-10 09:54:49 +02:00
parent 8bc8dd4fd7
commit b673f9d2b2
2 changed files with 20 additions and 0 deletions

View File

@ -129,6 +129,7 @@ void renderScene() {
}
void displayQTTree(QTNode *qn) {
//QT_split(qn);
QT_enumerate(qn);
}

19
square.h Normal file
View File

@ -0,0 +1,19 @@
// get_z()
#include "roam.h"
// QuadTree Node.
typedef struct QTNode {
Vertex* center;
Vertex* vertices[4];
struct QTNode* children[4];
struct QTNode* neighbors[4];
// linked list across all nodes, for traversal when we display them.
struct QTNode* nextNode;
struct QTNode* previousNode;
unsigned int minLOD;
unsigned int maxLOD;
} QTNode;
QTNode* QT_example();
void QT_enumerate(QTNode* first);
void QT_split(QTNode* parent);