#ifndef GEOMETRY_UTILS_ROTATIONN_H #define GEOMETRY_UTILS_ROTATIONN_H #include #include #include "VectorNBase.h" #include "MatrixNxNBase.h" namespace geometry_utils { template struct RotationNBase : MatrixNxNBase { RotationNBase() : MatrixNxNBase() { this->Eye(); } RotationNBase(const RotationNBase& in) : MatrixNxNBase(in.data) {} RotationNBase(const boost::array& in) : MatrixNxNBase(in) {} RotationNBase(T (&in)[N * N]) : MatrixNxNBase(in) {} RotationNBase(const Eigen::Matrix& in) : MatrixNxNBase(in) {} RotationNBase(const MatrixNxNBase& in) : MatrixNxNBase(in) {} virtual inline MatrixNxNBase Inv() const { return this->Trans(); } }; template inline RotationNBase operator*(const float& lhs, const RotationNBase& rhs) { return RotationNBase(rhs * lhs); } template inline RotationNBase operator*(const double& lhs, const RotationNBase& rhs) { return RotationNBase(rhs * lhs); } template inline RotationNBase Inv(const RotationNBase& m) { return m.Inv(); } } #endif