aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-11-03 11:03:08 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-11-03 11:03:08 +0100
commit3f1d0cdc2270f13fbc72d6b7080012e22329aabd (patch)
treec008bb31923a4f8153d123b5c5d8cb9c11a2af7c /Eigen/src/Geometry
parent78e93ac1ad410bd497cf574e68545f38f7387b4d (diff)
bug #1337: improve doc of homogeneous() and hnormalized()
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/Homogeneous.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h
index b4d7946e3..5f0da1a9e 100644
--- a/Eigen/src/Geometry/Homogeneous.h
+++ b/Eigen/src/Geometry/Homogeneous.h
@@ -114,7 +114,9 @@ template<typename MatrixType,int _Direction> class Homogeneous
/** \geometry_module \ingroup Geometry_Module
*
- * \return an expression of the equivalent homogeneous vector
+ * \returns a vector expression that is one longer than the vector argument, with the value 1 symbolically appended as the last coefficient.
+ *
+ * This can be used to convert affine coordinates to homogeneous coordinates.
*
* \only_for_vectors
*
@@ -133,7 +135,9 @@ MatrixBase<Derived>::homogeneous() const
/** \geometry_module \ingroup Geometry_Module
*
- * \returns a matrix expression of homogeneous column (or row) vectors
+ * \returns an expression where the value 1 is symbolically appended as the final coefficient to each column (or row) of the matrix.
+ *
+ * This can be used to convert affine coordinates to homogeneous coordinates.
*
* Example: \include VectorwiseOp_homogeneous.cpp
* Output: \verbinclude VectorwiseOp_homogeneous.out
@@ -148,7 +152,16 @@ VectorwiseOp<ExpressionType,Direction>::homogeneous() const
/** \geometry_module \ingroup Geometry_Module
*
- * \returns an expression of the homogeneous normalized vector of \c *this
+ * \brief homogeneous normalization
+ *
+ * \returns a vector expression of the N-1 first coefficients of \c *this divided by that last coefficient.
+ *
+ * This can be used to convert homogeneous coordinates to affine coordinates.
+ *
+ * It is essentially a shortcut for:
+ * \code
+ this->head(this->size()-1)/this->coeff(this->size()-1);
+ \endcode
*
* Example: \include MatrixBase_hnormalized.cpp
* Output: \verbinclude MatrixBase_hnormalized.out
@@ -166,7 +179,13 @@ MatrixBase<Derived>::hnormalized() const
/** \geometry_module \ingroup Geometry_Module
*
- * \returns an expression of the homogeneous normalized vector of \c *this
+ * \brief column or row-wise homogeneous normalization
+ *
+ * \returns an expression of the first N-1 coefficients of each column (or row) of \c *this divided by the last coefficient of each column (or row).
+ *
+ * This can be used to convert homogeneous coordinates to affine coordinates.
+ *
+ * It is conceptually equivalent to calling MatrixBase::hnormalized() to each column (or row) of \c *this.
*
* Example: \include DirectionWise_hnormalized.cpp
* Output: \verbinclude DirectionWise_hnormalized.out