aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp/math/LinearTransformations.h
diff options
context:
space:
mode:
authorcathook <b01902109@csie.ntu.edu.tw>2014-05-01 05:15:29 +0800
committercathook <b01902109@csie.ntu.edu.tw>2014-05-01 05:15:29 +0800
commitb05f1bc3bc1a0f3316b755f8c2a9acab562614ad (patch)
treeb9cfb60aa2df3e2a891f3f78ab5166adea3d8cf1 /meowpp/math/LinearTransformations.h
parent5e989019d254dfc2e7ca8f3c6a8dc6507cd0efaf (diff)
downloadmeow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar.gz
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar.bz2
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar.lz
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar.xz
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.tar.zst
meow-b05f1bc3bc1a0f3316b755f8c2a9acab562614ad.zip
add math
Diffstat (limited to 'meowpp/math/LinearTransformations.h')
-rw-r--r--meowpp/math/LinearTransformations.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/meowpp/math/LinearTransformations.h b/meowpp/math/LinearTransformations.h
new file mode 100644
index 0000000..4878834
--- /dev/null
+++ b/meowpp/math/LinearTransformations.h
@@ -0,0 +1,38 @@
+#ifndef math_LinearTransformations_H__
+#define math_LinearTransformations_H__
+
+#include "LinearTransformation.h"
+
+#include <cstdlib>
+
+namespace meow{
+ template<class Scalar>
+ class Rotation3D: public LinearTransformation<Scalar>{
+ private:
+ Scalar _theta[3];
+ void calcMatrix();
+ public:
+ Rotation3D();
+
+ void axisTheta(Matrix<Scalar> const& __axis, Scalar const& __theta);
+
+ Scalar parameter(size_t __i) const;
+ Scalar parameter(size_t __i, Scalar const& __s);
+
+ Matrix<Scalar> transformate(Matrix<Scalar> const& __x) const;
+ Matrix<Scalar> jacobian (Matrix<Scalar> const& __x) const;
+ Matrix<Scalar> jacobian (Matrix<Scalar> const& __x,
+ size_t __i) const;
+
+ Matrix<Scalar> invTransformate(Matrix<Scalar> const& __x) const;
+ Matrix<Scalar> invJacobian (Matrix<Scalar> const& __x) const;
+ Matrix<Scalar> invJacobian (Matrix<Scalar> const& __x,
+ size_t __i) const;
+
+ Matrix<Scalar> invMatrix() const;
+ };
+}
+
+#include "LinearTransformations.hpp"
+
+#endif // math_LinearTransformations_H__