summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-12-10 19:12:31 -0600
committersanine <sanine.not@pm.me>2022-12-10 19:12:31 -0600
commit7c47f23ee92afa07c748700f1de22fd8b8ccf967 (patch)
tree4387add23b932b74c237128c579c4c2c9005262a /src/node.c
parent8bc49efb970ac44f17f6076bb16f1d0e712bd750 (diff)
refactor: remove node.* and util.* and move 3rdparty libs into separate directory
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/node.c b/src/node.c
deleted file mode 100644
index abf0034..0000000
--- a/src/node.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <string.h>
-
-#include <kalmia.h>
-#include <ezxml.h>
-
-#include "util.h"
-#include "transform.h"
-#include "node.h"
-
-
-ka_node_t * kai_parse_node(kalmia_t *k, ezxml_t tag)
-{
- /* check for incorrect tag name */
- if (strcmp("node", ezxml_name(tag)) != 0)
- return NULL;
-
- /* initialize node */
- ka_node_t *node = kai_next_node(k);
- kai_identity(&(node->transform));
-
- /* get first child */
- ezxml_t t = tag->child;
-
- /* iterate over sub-tags */
- while (t != NULL) {
- const char *t_name = ezxml_name(t);
- ka_matrix_t m;
- if (strcmp(t_name, "matrix") == 0) {
- /* process matrix */
- kai_parse_matrix(&m, t);
- kai_multiply(&(node->transform), node->transform, m);
- }
- else if (strcmp(t_name, "rotate") == 0) {
- /* process rotation */
- kai_parse_rotate(&m, t);
- kai_multiply(&(node->transform), node->transform, m);
- }
- else if (strcmp(t_name, "scale") == 0) {
- /* process scale */
- kai_parse_scale(&m, t);
- kai_multiply(&(node->transform), node->transform, m);
- }
- else if (strcmp(t_name, "translate") == 0) {
- /* process translation */
- kai_parse_translate(&m, t);
- kai_multiply(&(node->transform), node->transform, m);
- }
-
- /* advance to next child node */
- t = t->ordered;
- }
-
- return node;
-}