coeng
annotate 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 |
rev | line source |
---|---|
nuclear@5 | 1 #ifndef CO_XFORM_H_ |
nuclear@5 | 2 #define CO_XFORM_H_ |
nuclear@2 | 3 |
nuclear@2 | 4 #include <vmath/vmath.h> |
nuclear@2 | 5 #include "comp.h" |
nuclear@2 | 6 |
nuclear@5 | 7 class CoXForm : public Component { |
nuclear@2 | 8 public: |
nuclear@2 | 9 Matrix4x4 xform; |
nuclear@2 | 10 |
nuclear@5 | 11 CoXForm(); |
nuclear@2 | 12 }; |
nuclear@2 | 13 |
nuclear@5 | 14 class CoPRS : public Component { |
nuclear@6 | 15 protected: |
nuclear@5 | 16 CoXForm *co_xform; // cached xform component of the parent object |
nuclear@2 | 17 |
nuclear@6 | 18 const char **update_before() const; |
nuclear@6 | 19 |
nuclear@2 | 20 public: |
nuclear@2 | 21 Vector3 pos, scale; |
nuclear@2 | 22 Quaternion rot; |
nuclear@2 | 23 |
nuclear@5 | 24 CoPRS(); |
nuclear@2 | 25 |
nuclear@6 | 26 void update(float dt); |
nuclear@2 | 27 }; |
nuclear@2 | 28 |
nuclear@8 | 29 // helper component accessors |
nuclear@8 | 30 CoXForm *gobj_co_xform(const GObject *obj, bool nofail = true); |
nuclear@8 | 31 CoPRS *gobj_co_prs(const GObject *obj, bool nofail = true); |
nuclear@8 | 32 |
nuclear@2 | 33 |
nuclear@5 | 34 #endif // CO_XFORM_H_ |