diff options
Diffstat (limited to 'libdimension/kD_splay_tree.h')
-rw-r--r-- | libdimension/kD_splay_tree.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libdimension/kD_splay_tree.h b/libdimension/kD_splay_tree.h index b64be35..eac47d8 100644 --- a/libdimension/kD_splay_tree.h +++ b/libdimension/kD_splay_tree.h @@ -32,8 +32,13 @@ #ifndef DIMENSION_IMPL_KD_SPLAY_TREE_H #define DIMENSION_IMPL_KD_SPLAY_TREE_H +typedef struct dmnsn_kD_splay_tree dmnsn_kD_splay_tree; typedef struct dmnsn_kD_splay_node dmnsn_kD_splay_node; +struct dmnsn_kD_splay_tree { + dmnsn_kD_splay_node *root; +}; + struct dmnsn_kD_splay_node { /* Tree children */ dmnsn_kD_splay_node *contains, *container; @@ -48,15 +53,14 @@ struct dmnsn_kD_splay_node { dmnsn_object *object; }; -dmnsn_kD_splay_node *dmnsn_new_kD_splay_tree(); -dmnsn_kD_splay_node *dmnsn_kD_splay_copy(dmnsn_kD_splay_node *root); -void dmnsn_delete_kD_splay_tree(dmnsn_kD_splay_node *root); +dmnsn_kD_splay_tree *dmnsn_new_kD_splay_tree(); +dmnsn_kD_splay_tree *dmnsn_kD_splay_copy(dmnsn_kD_splay_tree *tree); +void dmnsn_delete_kD_splay_tree(dmnsn_kD_splay_tree *tree); -dmnsn_kD_splay_node *dmnsn_kD_splay_insert(dmnsn_kD_splay_node *root, - dmnsn_object *object); -void dmnsn_kD_splay(dmnsn_kD_splay_node *node); +void dmnsn_kD_splay_insert(dmnsn_kD_splay_tree *tree, dmnsn_object *object); +void dmnsn_kD_splay(dmnsn_kD_splay_tree *tree, dmnsn_kD_splay_node *node); -dmnsn_intersection *dmnsn_kD_splay_search(dmnsn_kD_splay_node *root, +dmnsn_intersection *dmnsn_kD_splay_search(dmnsn_kD_splay_tree *tree, dmnsn_line ray); #endif /* DIMENSION_IMPL_KD_SPLAY_TREE_H */ |