refactoring with ECS

This commit is contained in:
Hartmut Seichter 2020-12-15 12:39:25 +01:00
parent 4078cdea8f
commit e25625998c
20 changed files with 176 additions and 770 deletions

View file

@ -1,8 +1,5 @@
#include <pw/core/vector.hpp>
#include <pw/core/serialize.hpp>
#include <pw/scene/node.hpp>
#include <pw/scene/transform.hpp>
#include <pw/scene/traverser.hpp>
#include <iostream>
@ -23,25 +20,12 @@
#include <iostream>
void print_node_path(pw::node::ref node) {
auto parents = node->path();
std::cout << node->name() << " - ";
for (auto p : node->path()) {
std::cout << " p:'" << p->name() << "'";
}
std::cout << std::endl;
}
int main(int argc,char **argv) {
using namespace pw;
node::ref root(std::make_shared<node>());
root->set_name("root");
// node::ref root(std::make_shared<node>());
// root->set_name("root");
// root->add_child()->set_name("sub-1");
// node::ref sub_2_1 = std::make_shared<node>("sub-2-1");