mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
fix compilation with gcc 4.3
This commit is contained in:
parent
94f6f2a7de
commit
ca048aaf77
@ -2,6 +2,7 @@
|
|||||||
#define EIGEN_GEOMETRY_MODULE_H
|
#define EIGEN_GEOMETRY_MODULE_H
|
||||||
|
|
||||||
#include "Array"
|
#include "Array"
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
*
|
*
|
||||||
* \class AlignedBox
|
* \class AlignedBox
|
||||||
*
|
*
|
||||||
* \brief A box aligned with a axis
|
* \brief An axis aligned box
|
||||||
*
|
*
|
||||||
* \param _Scalar the type of the scalar coefficients
|
* \param _Scalar the type of the scalar coefficients
|
||||||
* \param _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
|
* \param _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
|
||||||
*
|
*
|
||||||
* This class represents an axis aligned box as the pair of the minimal and maximal corners.
|
* This class represents an axis aligned box as a pair of the minimal and maximal corners.
|
||||||
*/
|
*/
|
||||||
template <typename _Scalar, int _AmbientDim>
|
template <typename _Scalar, int _AmbientDim>
|
||||||
class AlignedBox
|
class AlignedBox
|
||||||
@ -107,6 +107,10 @@ public:
|
|||||||
inline AlignedBox& clamp(const AlignedBox& b)
|
inline AlignedBox& clamp(const AlignedBox& b)
|
||||||
{ m_min = m_min.cwise().max(b.m_min); m_max = m_max.cwise().min(b.m_max); return *this; }
|
{ m_min = m_min.cwise().max(b.m_min); m_max = m_max.cwise().min(b.m_max); return *this; }
|
||||||
|
|
||||||
|
/** Translate \c *this by the vector \a t and returns a reference to \c *this. */
|
||||||
|
inline AlignedBox& translate(const VectorType& t)
|
||||||
|
{ m_min += t; m_max += t; return *this; }
|
||||||
|
|
||||||
/** \returns the squared distance between the point \a p and the box \c *this,
|
/** \returns the squared distance between the point \a p and the box \c *this,
|
||||||
* and zero if \a p is inside the box.
|
* and zero if \a p is inside the box.
|
||||||
* \sa exteriorDistance()
|
* \sa exteriorDistance()
|
||||||
@ -120,14 +124,6 @@ public:
|
|||||||
inline Scalar exteriorDistance(const VectorType& p) const
|
inline Scalar exteriorDistance(const VectorType& p) const
|
||||||
{ return ei_sqrt(squaredExteriorDistance(p)); }
|
{ return ei_sqrt(squaredExteriorDistance(p)); }
|
||||||
|
|
||||||
/** Translate \c *this by the vector \a t and returns a reference to \c *this. */
|
|
||||||
inline AlignedBox& translate(const VectorType& t)
|
|
||||||
{
|
|
||||||
m_min += t;
|
|
||||||
m_max += t;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \returns \c *this with scalar type casted to \a NewScalarType
|
/** \returns \c *this with scalar type casted to \a NewScalarType
|
||||||
*
|
*
|
||||||
* Note that if \a NewScalarType is equal to the current scalar type of \c *this
|
* Note that if \a NewScalarType is equal to the current scalar type of \c *this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user