summaryrefslogtreecommitdiffstats
path: root/libdimension/kD_splay_tree.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-10-05 22:19:36 +0000
committerTavian Barnes <tavianator@gmail.com>2009-10-05 22:19:36 +0000
commitb45483d72dbc9c0eb8fee10df65877e5e2bfad91 (patch)
tree14db0b6ed752cc7842821d35517fcb0722df3954 /libdimension/kD_splay_tree.h
parent546c456320a11bb79ba33f65892e0a3252d822d2 (diff)
downloaddimension-b45483d72dbc9c0eb8fee10df65877e5e2bfad91.tar.xz
Implement insert for kD splay trees.
Diffstat (limited to 'libdimension/kD_splay_tree.h')
-rw-r--r--libdimension/kD_splay_tree.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdimension/kD_splay_tree.h b/libdimension/kD_splay_tree.h
index 7d00b8c..61c1944 100644
--- a/libdimension/kD_splay_tree.h
+++ b/libdimension/kD_splay_tree.h
@@ -18,6 +18,17 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
+/*
+ * k-dimensional (in this case, k == 3) trees for storing object bounding boxes.
+ * Each node's bounding box entirely contains the bounding boxes of the nodes
+ * to its left, and is entirely contained by the bounding boxes of the nodes to
+ * its right. Splay trees are used for the implementation, to bring commonly-
+ * used objects (the most recent object which a ray has hit) near the root of
+ * the tree for fast access. Object's bounding boxes are expanded as needed
+ * when inserted into the tree: if they intersect an existing bounding box, they
+ * are expanded to contain it.
+ */
+
#ifndef DIMENSION_IMPL_KD_SPLAY_TREE_H
#define DIMENSION_IMPL_KD_SPLAY_TREE_H