coeng
diff src/comp_xform.h @ 2:4a1c9597f4d3
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 05 Feb 2015 11:04:07 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/comp_xform.h Thu Feb 05 11:04:07 2015 +0200 1.3 @@ -0,0 +1,28 @@ 1.4 +#ifndef COMP_XFORM_H_ 1.5 +#define COMP_XFORM_H_ 1.6 + 1.7 +#include <vmath/vmath.h> 1.8 +#include "comp.h" 1.9 + 1.10 +class CompXForm : public Component { 1.11 +public: 1.12 + Matrix4x4 xform; 1.13 + 1.14 + CompXForm(); 1.15 +}; 1.16 + 1.17 +class CompPRS : public Component { 1.18 +private: 1.19 + CompXForm *co_xform; // cached xform component of the parent object 1.20 + 1.21 +public: 1.22 + Vector3 pos, scale; 1.23 + Quaternion rot; 1.24 + 1.25 + CompPRS(); 1.26 + 1.27 + void update(); 1.28 +}; 1.29 + 1.30 + 1.31 +#endif // COMP_XFORM_H_