erebus

view liberebus/src/snode.h @ 0:4abdce1361b9

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 27 Apr 2014 16:02:47 +0300
parents
children 59a72293f9bd
line source
1 #ifndef SNODE_H_
2 #define SNODE_H_
4 #include <vector>
5 #include "object.h"
6 #include "vmath/vmath.h"
8 class SceneNode {
9 private:
10 Vector3 pos;
11 Quaternion rot;
12 Vector3 scale;
14 std::vector<Object*> obj;
16 SceneNode *parent;
17 std::vector<SceneNode*> children;
19 public:
20 void add_child(SceneNode *node);
22 int get_num_children() const;
23 SceneNode *get_child(int idx) const;
25 void set_position(const Vector3 &pos);
26 void set_rotation(const Quaternion &rot);
27 void set_scaling(const Vector3 &scale);
29 const Vector3 &get_node_position() const;
30 const Quaternion &get_node_rotation() const;
31 const Vector3 &get_node_scaling() const;
33 const Vector3 &get_position() const;
34 const Quaternion &get_rotation() const;
35 const Vector3 &get_scaling() const;
37 void update_node(long msec = 0) const;
38 void update(long msec = 0) const;
39 };
41 #endif // SNODE_H_