summaryrefslogtreecommitdiffstats
path: root/libdimension/prtree.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-07-18 01:47:52 -0600
committerTavian Barnes <tavianator@gmail.com>2010-07-18 01:47:52 -0600
commitb4fb97a0aaecdb6e3ff4dc9badc51dc12211c9a1 (patch)
tree068aad27d7f2b525f9ed3e36a0df9686a3b9ca29 /libdimension/prtree.c
parentbcd2739bdd1efbc08a3c421aa844655dee116c1c (diff)
downloaddimension-b4fb97a0aaecdb6e3ff4dc9badc51dc12211c9a1.tar.xz
Make DMNSN_PRTREE_B and internal types local to prtree.c.
Diffstat (limited to 'libdimension/prtree.c')
-rw-r--r--libdimension/prtree.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libdimension/prtree.c b/libdimension/prtree.c
index 55bbf5c..4e6131b 100644
--- a/libdimension/prtree.c
+++ b/libdimension/prtree.c
@@ -21,7 +21,17 @@
#include "dimension-impl.h"
#include <stdlib.h>
-typedef struct dmnsn_pseudo_prtree dmnsn_pseudo_prtree;
+/* Number of children per node */
+#define DMNSN_PRTREE_B 6
+
+struct dmnsn_prtree_node {
+ dmnsn_bounding_box bounding_box;
+
+ /* Children (objects or subtrees) */
+ bool is_leaf;
+ void *children[DMNSN_PRTREE_B];
+ dmnsn_bounding_box bounding_boxes[DMNSN_PRTREE_B];
+};
typedef struct dmnsn_pseudo_prleaf {
void *children[DMNSN_PRTREE_B];
@@ -29,6 +39,8 @@ typedef struct dmnsn_pseudo_prleaf {
dmnsn_bounding_box bounding_box;
} dmnsn_pseudo_prleaf;
+typedef struct dmnsn_pseudo_prtree dmnsn_pseudo_prtree;
+
typedef struct dmnsn_pseudo_prnode {
dmnsn_pseudo_prtree *left, *right;
dmnsn_pseudo_prleaf children[6];