summaryrefslogtreecommitdiff
path: root/src/transform_hierarchy.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-17 17:03:33 +1100
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-17 17:03:33 +1100
commit9ef22d2af0001bbc402454c8d605339ec6a428ae (patch)
tree748f5abb86edd255015647a7d414a725e2d2e76e /src/transform_hierarchy.c
parent8c331ac497d6e6705cde5e292538d4ab7d9a16ec (diff)
draw_scene that uses transform hierarchy to draw all models
Diffstat (limited to 'src/transform_hierarchy.c')
-rw-r--r--src/transform_hierarchy.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/transform_hierarchy.c b/src/transform_hierarchy.c
index a8b3df1..a36b8ef 100644
--- a/src/transform_hierarchy.c
+++ b/src/transform_hierarchy.c
@@ -7,11 +7,11 @@
#include <stdlib.h>
#include <string.h>
+#include "core.h"
#include "log.h"
#include "maths.h"
#include "maths_types.h"
#include "render_types.h"
-#include "core.h"
struct transform_hierarchy {
transform_node root;
@@ -50,7 +50,8 @@ void transform_hierarchy_free(transform_hierarchy* tfh) {
transform_node* transform_hierarchy_root_node(transform_hierarchy* tfh) { return &tfh->root; }
-transform_node* transform_hierarchy_add_node(transform_node* parent, model_handle model, transform tf) {
+transform_node* transform_hierarchy_add_node(transform_node* parent, model_handle model,
+ transform tf) {
if (!parent) {
WARN("You tried to add a node to a bad parent (NULL?)");
return NULL;
@@ -163,14 +164,14 @@ bool print_node(transform_node* node, void* ctx_data) {
return true;
}
- // Grab the model
+ // Grab the model
model m = ctx->core->models->data[node->model.raw];
for (int i = 0; i < ctx->indentation_lvl; i++) {
printf(" ");
}
printf("Node %s\n", m.name.buf);
ctx->indentation_lvl++;
-
+
return true;
}