Skip to content

Commit

Permalink
inserts nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Sep 28, 2022
1 parent c009dd8 commit a2f9721
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ref_oct.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ REF_FCN static REF_STATUS ref_oct_set_node_at_node(REF_OCT ref_oct,
for (child_index = 0; child_index < 8; child_index++) {
REF_DBL box[6];
RSS(ref_oct_child_bbox(bbox, child_index, box), "bbox");
RUS(node, ref_oct_child(ref_oct, child_index, node), "same");
RSS(ref_oct_set_node_at_node(ref_oct,
ref_oct_child(ref_oct, child_index, node),
box, insert_node, xyz),
Expand Down
8 changes: 8 additions & 0 deletions src/ref_oct_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ int main(int argc, char *argv[]) {
RSS(ref_oct_free(ref_oct), "free oct");
}

{
REF_OCT ref_oct;
RSS(ref_oct_create(&ref_oct), "make oct");
RSS(ref_oct_unique_nodes(ref_oct), "make nodes");
REIS(8, ref_oct_nnode(ref_oct), "expects 8 node hex");
RSS(ref_oct_free(ref_oct), "free oct");
}

{ /* contains root */
REF_OCT ref_oct;
REF_DBL xyz[] = {0.1, 0.1, 0.1};
Expand Down

0 comments on commit a2f9721

Please sign in to comment.