6 #include "gmath/gmath.h"
16 std::vector<Object*> obj;
19 std::vector<SceneNode*> children;
26 explicit SceneNode(Object *obj);
29 void set_name(const char *s);
30 const char *get_name() const;
32 void add_child(SceneNode *node);
33 bool remove_child(SceneNode *node);
35 int get_num_children() const;
36 SceneNode *get_child(int idx) const;
38 SceneNode *get_parent() const;
40 void add_object(Object *obj);
41 bool remove_object(Object *obj);
43 int get_num_objects() const;
44 Object *get_object(int idx) const;
46 void set_position(const Vec3 &pos);
47 void set_rotation(const Quat &rot);
48 void set_scaling(const Vec3 &scale);
50 const Vec3 &get_node_position() const;
51 const Quat &get_node_rotation() const;
52 const Vec3 &get_node_scaling() const;
54 Vec3 get_position() const;
55 Quat get_rotation() const;
56 Vec3 get_scaling() const;
58 const Mat4 &get_matrix() const;
59 const Mat4 &get_inv_matrix() const;
61 void update_node(float dt = 0.0f);
62 void update(float dt = 0.0f);
64 bool intersect(const Ray &ray, HitPoint *hit) const;