diff options
author | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-24 04:01:53 +0800 |
---|---|---|
committer | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-24 04:01:53 +0800 |
commit | a9955a1a51df2b268da4d28f9ad10dbaf9815634 (patch) | |
tree | 077acbd8e8bf801f517d75b1d5960f883aee5032 /meowpp/math/LinearTransformations.h | |
parent | e6f0bcfb63b144da659f28f6f03c51a9b7ae992a (diff) | |
download | meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.gz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.bz2 meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.lz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.xz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.zst meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.zip |
...
Diffstat (limited to 'meowpp/math/LinearTransformations.h')
-rw-r--r-- | meowpp/math/LinearTransformations.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/meowpp/math/LinearTransformations.h b/meowpp/math/LinearTransformations.h index e882a6c..4bf9a36 100644 --- a/meowpp/math/LinearTransformations.h +++ b/meowpp/math/LinearTransformations.h @@ -22,19 +22,19 @@ private: struct Myself { Vector3D<Scalar> theta_; bool need_; - + Myself(): theta_(0, 0, 0), need_(true) { } - + Myself(Myself const& b): theta_(b.theta_), need_(b.need_) { } - + ~Myself() { } }; - + Self<Myself> const self; - + void calcMatrix() const { if (self->need_) { Matrix<Scalar> tmp(3, 3, 0.0); @@ -61,27 +61,27 @@ private: self()->need_ = false; } } - + public: /*! * Constructor with no rotation */ Rotation3D(): LinearTransformation<Scalar>(3u, 3u, 3u), self() { } - + /*! * Constructor and copy data */ Rotation3D(Rotation3D const& b): LinearTransformation<Scalar>(b), self(b.self, Self<Myself>::COPY_FROM) { } - + /*! * Destructor */ ~Rotation3D() { } - + /*! * @brief Copy data * @@ -93,7 +93,7 @@ public: self().copyFrom(b.self); return *this; } - + /*! * @brief Reference data * @@ -119,7 +119,7 @@ public: Scalar parameter(size_t i, Scalar const& s) { return theta(i, s); } - + /*! * @brief Get the \c i -th theta * @@ -131,7 +131,7 @@ public: Scalar const& theta(size_t i) const { return self->theta_(i); } - + /*! * @brief Set the \c i -th theta * @@ -163,7 +163,7 @@ public: theta(i, n(i) * angle); } } - + /*! * @brief Concat another rotation transformation * @param [in] r another rotation transformation @@ -174,10 +174,10 @@ public: } return *this; } - + /*! * @brief Do the transformate - + * Assume: * - The input vector is \f$ (x ,y ,z ) \f$ * - The output vector is \f$ (x',y',z') \f$ @@ -214,7 +214,7 @@ public: calcMatrix(); return LinearTransformation<Scalar>::matrix() * x; } - + /*! * @brief Return the jacobian matrix (derivate by the input vector) * of this transformate @@ -244,7 +244,7 @@ public: calcMatrix(); return LinearTransformation<Scalar>::matrix(); } - + /*! * @brief Return the jacobian matrix of this transformate * @@ -344,7 +344,7 @@ public: Matrix<Scalar> transformateInv(Matrix<Scalar> const& x) const { return matrixInv() * x; } - + /*! * @brief Return the jacobian matrix of the inverse form of this transformate * @@ -354,7 +354,7 @@ public: Matrix<Scalar> jacobianInv(Matrix<Scalar> const& x) const { return matrixInv(); } - + /*! * @brief Return the jacobian matrix of the inverse form of this transformate * @@ -392,13 +392,13 @@ public: calcMatrix(); return LinearTransformation<Scalar>::matrix().transpose(); } - + //! @brief same as \c copyFrom(b) Rotation3D& operator=(Rotation3D const& b) { return copyFrom(b); } }; -} +} // meow #endif // math_LinearTransformations_H__ |