coeng

view src/co_xform.h @ 6:2f872a179914

first component test: - prs, xform, physics components with dependencies - topological sort of components to update them in the correct order - debug visualization component todo: remove draw() from components, doesn't make sense
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 07:27:12 +0200
parents 0e5da17d589c
children 8cce82794f90
line source
1 #ifndef CO_XFORM_H_
2 #define CO_XFORM_H_
4 #include <vmath/vmath.h>
5 #include "comp.h"
7 class CoXForm : public Component {
8 public:
9 Matrix4x4 xform;
11 CoXForm();
12 };
14 class CoPRS : public Component {
15 protected:
16 CoXForm *co_xform; // cached xform component of the parent object
18 const char **update_before() const;
20 public:
21 Vector3 pos, scale;
22 Quaternion rot;
24 CoPRS();
26 void update(float dt);
27 };
30 #endif // CO_XFORM_H_