6 #include "gmath/gmath.h"
16 std::vector<Object*> obj;
19 std::vector<SceneNode*> children;
28 explicit SceneNode(Object *obj);
31 void set_name(const char *s);
32 const char *get_name() const;
34 void add_child(SceneNode *node);
35 bool remove_child(SceneNode *node);
37 int get_num_children() const;
38 SceneNode *get_child(int idx) const;
40 SceneNode *get_parent() const;
42 void add_object(Object *obj);
43 bool remove_object(Object *obj);
45 int get_num_objects() const;
46 Object *get_object(int idx) const;
48 void set_position(const Vec3 &pos);
49 void set_rotation(const Quat &rot);
50 void set_scaling(const Vec3 &scale);
52 const Vec3 &get_node_position() const;
53 const Quat &get_node_rotation() const;
54 const Vec3 &get_node_scaling() const;
56 Vec3 get_position() const;
57 Quat get_rotation() const;
58 Vec3 get_scaling() const;
60 const Mat4 &get_matrix() const;
61 const Mat4 &get_inv_matrix() const;
63 void update_node(float dt = 0.0f);
64 void update(float dt = 0.0f);
66 bool intersect(const Ray &ray, HitPoint *hit) const;