- "Scalar angle(int) const" should be "const Vector& angles() const" - then method "coeffs" could be removed. - avoid one letter names like h, p, r -> use alpha(), beta(), gamma() ;) - about the "fromRotation" methods: - replace the ones which are not static by operator= (as in Quaternion) - the others are actually static methods: use a capital F: FromRotation - method "invert" should be removed. - use a macro to define both float and double EulerAnglesXYZ* typedefs - AddConstIf -> not used - no needs for NegateIfXor, compilers are extremely good at optimizing away branches based on compile time constants: if(IsHeadingOpposite-=IsEven) res.alpha() = -res.alpha();
39 lines
927 B
Plaintext
39 lines
927 B
Plaintext
// This file is part of Eigen, a lightweight C++ template library
|
|
// for linear algebra.
|
|
//
|
|
// Copyright (C) 2015 Tal Hadad <tal_hd@hotmail.com>
|
|
//
|
|
// This Source Code Form is subject to the terms of the Mozilla
|
|
// Public License v. 2.0. If a copy of the MPL was not distributed
|
|
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#ifndef EIGEN_EULERANGLES_MODULE_H
|
|
#define EIGEN_EULERANGLES_MODULE_H
|
|
|
|
|
|
#include "Eigen/Core"
|
|
#include "Eigen/Geometry"
|
|
|
|
#include "Eigen/src/Core/util/DisableStupidWarnings.h"
|
|
|
|
namespace Eigen {
|
|
|
|
/**
|
|
* \defgroup EulerAngles_Module EulerAngles module
|
|
* \brief This module provides generic euler angles rotation.
|
|
*
|
|
* \code
|
|
* #include <unsupported/Eigen/EulerAngles>
|
|
* \endcode
|
|
*
|
|
*/
|
|
|
|
}
|
|
|
|
#include "src/EulerAngles/EulerSystem.h"
|
|
#include "src/EulerAngles/EulerAngles.h"
|
|
|
|
#include "Eigen/src/Core/util/ReenableStupidWarnings.h"
|
|
|
|
#endif // EIGEN_EULERANGLES_MODULE_H
|