erebus
annotate 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 |
rev | line source |
---|---|
nuclear@0 | 1 #ifndef SNODE_H_ |
nuclear@0 | 2 #define SNODE_H_ |
nuclear@0 | 3 |
nuclear@0 | 4 #include <vector> |
nuclear@0 | 5 #include "object.h" |
nuclear@0 | 6 #include "vmath/vmath.h" |
nuclear@0 | 7 |
nuclear@0 | 8 class SceneNode { |
nuclear@0 | 9 private: |
nuclear@0 | 10 Vector3 pos; |
nuclear@0 | 11 Quaternion rot; |
nuclear@0 | 12 Vector3 scale; |
nuclear@0 | 13 |
nuclear@0 | 14 std::vector<Object*> obj; |
nuclear@0 | 15 |
nuclear@0 | 16 SceneNode *parent; |
nuclear@0 | 17 std::vector<SceneNode*> children; |
nuclear@0 | 18 |
nuclear@0 | 19 public: |
nuclear@0 | 20 void add_child(SceneNode *node); |
nuclear@0 | 21 |
nuclear@0 | 22 int get_num_children() const; |
nuclear@0 | 23 SceneNode *get_child(int idx) const; |
nuclear@0 | 24 |
nuclear@0 | 25 void set_position(const Vector3 &pos); |
nuclear@0 | 26 void set_rotation(const Quaternion &rot); |
nuclear@0 | 27 void set_scaling(const Vector3 &scale); |
nuclear@0 | 28 |
nuclear@0 | 29 const Vector3 &get_node_position() const; |
nuclear@0 | 30 const Quaternion &get_node_rotation() const; |
nuclear@0 | 31 const Vector3 &get_node_scaling() const; |
nuclear@0 | 32 |
nuclear@0 | 33 const Vector3 &get_position() const; |
nuclear@0 | 34 const Quaternion &get_rotation() const; |
nuclear@0 | 35 const Vector3 &get_scaling() const; |
nuclear@0 | 36 |
nuclear@0 | 37 void update_node(long msec = 0) const; |
nuclear@0 | 38 void update(long msec = 0) const; |
nuclear@0 | 39 }; |
nuclear@0 | 40 |
nuclear@0 | 41 #endif // SNODE_H_ |