(bind-func print_xtmmodel:[void,XTMModel*]*
(lambda (model)
(if (null? model)
(println "<XTMModel:null>")
(let ((i:i32 0)
(name (tref model 0))
(parent (tref model 2))
(parent_name (if (null? parent) (Str "<null>") (tref parent 0)))
(num_children (tref model 3))
(children (tref model 4))
(num_meshes (tref model 5))
(meshes (tref model 6)))
(printout "\n======= model =========")
(printout "\nname : " name)
(printout "\nparent : " parent_name)
(printout "\nchildren: " num_children)
(printout "\nmeshes : " num_meshes)
(println)
(dotimes (i num_meshes)
(println (pref-ptr meshes i))
1)
(dotimes (i num_children)
(print_xtmmodel (pref-ptr children i))
1)
void))))