aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/Homogeneous.h9
-rw-r--r--Eigen/src/Geometry/Hyperplane.h4
-rw-r--r--Eigen/src/Geometry/OrthoMethods.h18
-rw-r--r--Eigen/src/Geometry/ParametrizedLine.h6
-rw-r--r--Eigen/src/Geometry/Quaternion.h2
-rw-r--r--Eigen/src/Geometry/Rotation2D.h2
-rw-r--r--Eigen/src/Geometry/RotationBase.h8
-rw-r--r--Eigen/src/Geometry/Scaling.h7
-rw-r--r--Eigen/src/Geometry/Translation.h6
-rw-r--r--Eigen/src/Geometry/Umeyama.h18
10 files changed, 38 insertions, 42 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h
index 4107fba4d..cd52b5470 100644
--- a/Eigen/src/Geometry/Homogeneous.h
+++ b/Eigen/src/Geometry/Homogeneous.h
@@ -112,7 +112,7 @@ template<typename MatrixType,int _Direction> class Homogeneous
typename MatrixType::Nested m_matrix;
};
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \return an expression of the equivalent homogeneous vector
*
@@ -131,7 +131,7 @@ MatrixBase<Derived>::homogeneous() const
return HomogeneousReturnType(derived());
}
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \returns a matrix expression of homogeneous column (or row) vectors
*
@@ -146,7 +146,7 @@ VectorwiseOp<ExpressionType,Direction>::homogeneous() const
return HomogeneousReturnType(_expression());
}
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \returns an expression of the homogeneous normalized vector of \c *this
*
@@ -164,7 +164,7 @@ MatrixBase<Derived>::hnormalized() const
ColsAtCompileTime==1?1:size()-1) / coeff(size()-1);
}
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \returns an expression of the homogeneous normalized vector of \c *this
*
@@ -304,7 +304,6 @@ struct evaluator_traits<Homogeneous<ArgType,Direction> >
{
typedef typename storage_kind_to_evaluator_kind<typename ArgType::StorageKind>::Kind Kind;
typedef HomogeneousShape Shape;
- static const int AssumeAliasing = 0;
};
template<> struct AssignmentKind<DenseShape,HomogeneousShape> { typedef Dense2Dense Kind; };
diff --git a/Eigen/src/Geometry/Hyperplane.h b/Eigen/src/Geometry/Hyperplane.h
index 2d076d7f8..cc89639b6 100644
--- a/Eigen/src/Geometry/Hyperplane.h
+++ b/Eigen/src/Geometry/Hyperplane.h
@@ -22,8 +22,8 @@ namespace Eigen {
* A hyperplane is an affine subspace of dimension n-1 in a space of dimension n.
* For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.
*
- * \param _Scalar the scalar type, i.e., the type of the coefficients
- * \param _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
+ * \tparam _Scalar the scalar type, i.e., the type of the coefficients
+ * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
* Notice that the dimension of the hyperplane is _AmbientDim-1.
*
* This class represents an hyperplane as the zero set of the implicit equation
diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h
index 39b64b869..c3648f51f 100644
--- a/Eigen/src/Geometry/OrthoMethods.h
+++ b/Eigen/src/Geometry/OrthoMethods.h
@@ -13,7 +13,7 @@
namespace Eigen {
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \returns the cross product of \c *this and \a other
*
@@ -26,7 +26,11 @@ namespace Eigen {
*/
template<typename Derived>
template<typename OtherDerived>
+#ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename MatrixBase<Derived>::template cross_product_return_type<OtherDerived>::type
+#else
+inline typename MatrixBase<Derived>::PlainObject
+#endif
MatrixBase<Derived>::cross(const MatrixBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,3)
@@ -63,7 +67,7 @@ struct cross3_impl {
}
-/** \geometry_module
+/** \geometry_module \ingroup Geometry_Module
*
* \returns the cross product of \c *this and \a other using only the x, y, and z coefficients
*
@@ -90,14 +94,14 @@ MatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const
typename internal::remove_all<OtherDerivedNested>::type>::run(lhs,rhs);
}
-/** \returns a matrix expression of the cross product of each column or row
+/** \geometry_module \ingroup Geometry_Module
+ *
+ * \returns a matrix expression of the cross product of each column or row
* of the referenced expression with the \a other vector.
*
* The referenced matrix must have one dimension equal to 3.
* The result matrix has the same dimensions than the referenced one.
*
- * \geometry_module
- *
* \sa MatrixBase::cross() */
template<typename ExpressionType, int Direction>
template<typename OtherDerived>
@@ -207,7 +211,9 @@ struct unitOrthogonal_selector<Derived,2>
} // end namespace internal
-/** \returns a unit vector which is orthogonal to \c *this
+/** \geometry_module \ingroup Geometry_Module
+ *
+ * \returns a unit vector which is orthogonal to \c *this
*
* The size of \c *this must be at least 2. If the size is exactly 2,
* then the returned vector is a counter clock wise rotation of \c *this, i.e., (-y,x).normalized().
diff --git a/Eigen/src/Geometry/ParametrizedLine.h b/Eigen/src/Geometry/ParametrizedLine.h
index 93edd9148..c43dce773 100644
--- a/Eigen/src/Geometry/ParametrizedLine.h
+++ b/Eigen/src/Geometry/ParametrizedLine.h
@@ -23,8 +23,8 @@ namespace Eigen {
* direction vector \f$ \mathbf{d} \f$ such that the line corresponds to
* the set \f$ l(t) = \mathbf{o} + t \mathbf{d} \f$, \f$ t \in \mathbf{R} \f$.
*
- * \param _Scalar the scalar type, i.e., the type of the coefficients
- * \param _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
+ * \tparam _Scalar the scalar type, i.e., the type of the coefficients
+ * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
*/
template <typename _Scalar, int _AmbientDim, int _Options>
class ParametrizedLine
@@ -129,7 +129,7 @@ public:
* determined by \a prec.
*
* \sa MatrixBase::isApprox() */
- bool isApprox(const ParametrizedLine& other, typename NumTraits<Scalar>::Real prec = NumTraits<Scalar>::dummy_precision()) const
+ bool isApprox(const ParametrizedLine& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
{ return m_origin.isApprox(other.m_origin, prec) && m_direction.isApprox(other.m_direction, prec); }
protected:
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h
index 32e7e76fa..32d1499c6 100644
--- a/Eigen/src/Geometry/Quaternion.h
+++ b/Eigen/src/Geometry/Quaternion.h
@@ -277,7 +277,7 @@ public:
inline Coefficients& coeffs() { return m_coeffs;}
inline const Coefficients& coeffs() const { return m_coeffs;}
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsAlignment)
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(NeedsAlignment))
#ifdef EIGEN_QUATERNION_PLUGIN
# include EIGEN_QUATERNION_PLUGIN
diff --git a/Eigen/src/Geometry/Rotation2D.h b/Eigen/src/Geometry/Rotation2D.h
index 8b0ddcfb0..5ab0d5920 100644
--- a/Eigen/src/Geometry/Rotation2D.h
+++ b/Eigen/src/Geometry/Rotation2D.h
@@ -18,7 +18,7 @@ namespace Eigen {
*
* \brief Represents a rotation/orientation in a 2 dimensional space.
*
- * \param _Scalar the scalar type, i.e., the type of the coefficients
+ * \tparam _Scalar the scalar type, i.e., the type of the coefficients
*
* This class is equivalent to a single scalar representing a counter clock wise rotation
* as a single angle in radian. It provides some additional features such as the automatic
diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h
index b88661de6..fadfd9151 100644
--- a/Eigen/src/Geometry/RotationBase.h
+++ b/Eigen/src/Geometry/RotationBase.h
@@ -22,8 +22,8 @@ struct rotation_base_generic_product_selector;
*
* \brief Common base class for compact rotation representations
*
- * \param Derived is the derived type, i.e., a rotation type
- * \param _Dim the dimension of the space
+ * \tparam Derived is the derived type, i.e., a rotation type
+ * \tparam _Dim the dimension of the space
*/
template<typename Derived, int _Dim>
class RotationBase
@@ -164,8 +164,8 @@ namespace internal {
*
* Helper function to return an arbitrary rotation object to a rotation matrix.
*
- * \param Scalar the numeric type of the matrix coefficients
- * \param Dim the dimension of the current space
+ * \tparam Scalar the numeric type of the matrix coefficients
+ * \tparam Dim the dimension of the current space
*
* It returns a Dim x Dim fixed size matrix.
*
diff --git a/Eigen/src/Geometry/Scaling.h b/Eigen/src/Geometry/Scaling.h
index 023fba2ee..643138199 100644
--- a/Eigen/src/Geometry/Scaling.h
+++ b/Eigen/src/Geometry/Scaling.h
@@ -18,7 +18,7 @@ namespace Eigen {
*
* \brief Represents a generic uniform scaling transformation
*
- * \param _Scalar the scalar type, i.e., the type of the coefficients.
+ * \tparam _Scalar the scalar type, i.e., the type of the coefficients.
*
* This class represent a uniform scaling transformation. It is the return
* type of Scaling(Scalar), and most of the time this is the only way it
@@ -104,6 +104,9 @@ public:
};
+/** \addtogroup Geometry_Module */
+//@{
+
/** Concatenates a linear transformation matrix and a uniform scaling */
// NOTE this operator is defiend in MatrixBase and not as a friend function
// of UniformScaling to fix an internal crash of Intel's ICC
@@ -136,8 +139,6 @@ template<typename Derived>
static inline const DiagonalWrapper<const Derived> Scaling(const MatrixBase<Derived>& coeffs)
{ return coeffs.asDiagonal(); }
-/** \addtogroup Geometry_Module */
-//@{
/** \deprecated */
typedef DiagonalMatrix<float, 2> AlignedScaling2f;
/** \deprecated */
diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h
index 7fda179cc..82d7777f0 100644
--- a/Eigen/src/Geometry/Translation.h
+++ b/Eigen/src/Geometry/Translation.h
@@ -18,8 +18,8 @@ namespace Eigen {
*
* \brief Represents a translation transformation
*
- * \param _Scalar the scalar type, i.e., the type of the coefficients.
- * \param _Dim the dimension of the space, can be a compile time value or Dynamic
+ * \tparam _Scalar the scalar type, i.e., the type of the coefficients.
+ * \tparam _Dim the dimension of the space, can be a compile time value or Dynamic
*
* \note This class is not aimed to be used to store a translation transformation,
* but rather to make easier the constructions and updates of Transform objects.
@@ -162,7 +162,7 @@ public:
* determined by \a prec.
*
* \sa MatrixBase::isApprox() */
- bool isApprox(const Translation& other, typename NumTraits<Scalar>::Real prec = NumTraits<Scalar>::dummy_precision()) const
+ bool isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
{ return m_coeffs.isApprox(other.m_coeffs, prec); }
};
diff --git a/Eigen/src/Geometry/Umeyama.h b/Eigen/src/Geometry/Umeyama.h
index 8d9b7a154..7e933fca1 100644
--- a/Eigen/src/Geometry/Umeyama.h
+++ b/Eigen/src/Geometry/Umeyama.h
@@ -135,22 +135,12 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo
// Eq. (39)
VectorType S = VectorType::Ones(m);
- if (sigma.determinant()<Scalar(0)) S(m-1) = Scalar(-1);
+
+ if ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 )
+ S(m-1) = -1;
// Eq. (40) and (43)
- const VectorType& d = svd.singularValues();
- Index rank = 0; for (Index i=0; i<m; ++i) if (!internal::isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank;
- if (rank == m-1) {
- if ( svd.matrixU().determinant() * svd.matrixV().determinant() > Scalar(0) ) {
- Rt.block(0,0,m,m).noalias() = svd.matrixU()*svd.matrixV().transpose();
- } else {
- const Scalar s = S(m-1); S(m-1) = Scalar(-1);
- Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
- S(m-1) = s;
- }
- } else {
- Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
- }
+ Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
if (with_scaling)
{