absence_thelab
diff src/3deng/motion.h @ 0:1cffe3409164
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 23 Oct 2014 01:46:07 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/3deng/motion.h Thu Oct 23 01:46:07 2014 +0300 1.3 @@ -0,0 +1,37 @@ 1.4 +#ifndef _MOTION_H_ 1.5 +#define _MOTION_H_ 1.6 + 1.7 +#include "n3dmath.h" 1.8 +#include "curves.h" 1.9 + 1.10 +class MotionController { 1.11 +private: 1.12 + Matrix4x4 MotionXForm; 1.13 + bool FollowPath; 1.14 + float ScaleInputTrans, ScaleInputRot, ScaleInputScale; 1.15 + 1.16 + float (*XTranslation)(float); 1.17 + float (*YTranslation)(float); 1.18 + float (*ZTranslation)(float); 1.19 + float (*XRotation)(float); 1.20 + float (*YRotation)(float); 1.21 + float (*ZRotation)(float); 1.22 + float (*XScaling)(float); 1.23 + float (*YScaling)(float); 1.24 + float (*ZScaling)(float); 1.25 + 1.26 +public: 1.27 + 1.28 + MotionController(); 1.29 + 1.30 + void SetTranslation(float (*xtrans)(float), float (*ytrans)(float), float (*ztrans)(float), float ScaleInput = 1.0f); 1.31 + void SetRotation(float (*xrot)(float), float (*yrot)(float), float (*zrot)(float), float ScaleInput = 1.0f); 1.32 + void SetScaling(float (*xscale)(float), float (*yscale)(float), float (*zscale)(float), float ScaleInput = 1.0f); 1.33 + void SetPath(const Curve &path); 1.34 + 1.35 + const Matrix4x4 &GetTransformation(float t); 1.36 +}; 1.37 + 1.38 + 1.39 + 1.40 +#endif // _MOTION_H_ 1.41 \ No newline at end of file