coeng
view src/co_xform.h @ 10:305c8f6abef1
the plane doesn't need a PRS really
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Feb 2015 05:25:04 +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_