coeng

annotate src/co_xform.h @ 7:af24cfbdf9b6

adding collision detection
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 10:08:00 +0200
parents 0e5da17d589c
children 8cce82794f90
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@2 29
nuclear@5 30 #endif // CO_XFORM_H_