20 // meshes objects and nodes are owned by Scene
21 std::vector<Mesh*> meshes;
22 std::vector<Object*> objects;
27 TextureSet *texset; // only owned by Scene if own_texset is true
29 explicit Scene(TextureSet *tset = 0);
32 Scene(const Scene &rhs) = delete;
33 Scene &operator =(const Scene &rhs) = delete;
37 bool load(const char *fname, unsigned int flags = 0);
39 void add_object(Object *obj);
40 bool remove_object(Object *obj);
41 bool have_object(Object *obj) const;
43 void add_mesh(Mesh *m);
44 bool remove_mesh(Mesh *m);
45 bool have_mesh(Mesh *m) const;
47 void add_node(SceneNode *n);
48 bool remove_node(SceneNode *n);
49 bool have_node(SceneNode *n) const;
51 /* find and remove all nodes whose names match the regexp
52 * XXX at the moment this has the effect of flattening the hierarchy in the
53 * result scene. If we ever need verbatim extraction of whole subtrees we'll
54 * need to change the algorithm.
56 Scene *extract_nodes(const char *qstr);
58 /* bake all node transformations to their respective meshes and make the
59 * node transformations identity.
60 * XXX this assumes no mesh is shared by two nodes.
64 void update(float dt);