From 31359e468c4f1d844f19862f63ed911b66b98068 Mon Sep 17 00:00:00 2001 From: Omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:07:45 +1100 Subject: print desu? --- src/transform_hierarchy.c | 16 ++++++++++++++++ src/transform_hierarchy.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/transform_hierarchy.c b/src/transform_hierarchy.c index 468be56..65d4edf 100644 --- a/src/transform_hierarchy.c +++ b/src/transform_hierarchy.c @@ -11,6 +11,7 @@ #include "maths.h" #include "maths_types.h" #include "render_types.h" +#include "core.h" struct transform_hierarchy { transform_node root; @@ -144,4 +145,19 @@ bool update_matrix(transform_node* node, void* _ctx_data) { void transform_hierarchy_propagate_transforms(transform_hierarchy* tfh) { // kickoff traversal transform_hierarchy_dfs(&tfh->root, update_matrix, false, NULL); +} + +void print_node(transform_node* node, void* _ctx_data) { + // Grab the model + model m = core->models->data[start_node->model.raw]; + printf("Node %s\n", m.name.buf); +} + +struct print_ctx { + core* core; + u32 indentation_lvl; +}; + +void transform_hierarchy_debug_print(transform_node* start_node, core* core) { + } \ No newline at end of file diff --git a/src/transform_hierarchy.h b/src/transform_hierarchy.h index 9af8a97..61989f1 100644 --- a/src/transform_hierarchy.h +++ b/src/transform_hierarchy.h @@ -64,4 +64,5 @@ void transform_hierarchy_delete_node(transform_node* node); */ void transform_hierarchy_dfs(transform_node* start_node, bool (*visit_node)(transform_node* node, void* ctx_data), bool is_pre_order, void* ctx_data); -void transform_hierarchy_debug_print(transform_node* start_node, ) \ No newline at end of file +struct core; +void transform_hierarchy_debug_print(transform_node* start_nod, struct core* core); \ No newline at end of file -- cgit v1.2.3-70-g09d2