From b673f9d2b212358e7b75106cd371b6659ed037cc Mon Sep 17 00:00:00 2001 From: Yoann Date: Mon, 10 Oct 2011 09:54:49 +0200 Subject: [PATCH] Continuation. --- display.c | 1 + square.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 square.h diff --git a/display.c b/display.c index 92c6590..aabfd8c 100644 --- a/display.c +++ b/display.c @@ -129,6 +129,7 @@ void renderScene() { } void displayQTTree(QTNode *qn) { + //QT_split(qn); QT_enumerate(qn); } diff --git a/square.h b/square.h new file mode 100644 index 0000000..a15d627 --- /dev/null +++ b/square.h @@ -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);