coeng

view src/co_xform.h @ 8:8cce82794f90

seems to work nicely
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 15 Feb 2015 05:14:20 +0200
parents 2f872a179914
children
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 };
29 // helper component accessors
30 CoXForm *gobj_co_xform(const GObject *obj, bool nofail = true);
31 CoPRS *gobj_co_prs(const GObject *obj, bool nofail = true);
34 #endif // CO_XFORM_H_