unless i find more failures in the tests, this will be beta3...

* fixes for mistakes (especially in the cast() methods in Geometry) revealed by the new "mixing types" test
* dox love, including a section on coeff access in core and an overview in geometry
This commit is contained in:
Benoit Jacob
2008-12-22 20:50:47 +00:00
parent 4336cf3833
commit 789ea9d676
12 changed files with 51 additions and 12 deletions

View File

@@ -142,8 +142,8 @@ public:
template<typename OtherScalarType>
inline explicit AlignedBox(const AlignedBox<OtherScalarType,AmbientDimAtCompileTime>& other)
{
m_min = other.min().template cast<OtherScalarType>();
m_max = other.max().template cast<OtherScalarType>();
m_min = other.min().template cast<Scalar>();
m_max = other.max().template cast<Scalar>();
}
/** \returns \c true if \c *this is approximately equal to \a other, within the precision

View File

@@ -146,7 +146,7 @@ public:
template<typename OtherScalarType>
inline explicit AngleAxis(const AngleAxis<OtherScalarType>& other)
{
m_axis = other.axis().template cast<OtherScalarType>();
m_axis = other.axis().template cast<Scalar>();
m_angle = other.angle();
}

View File

@@ -254,7 +254,7 @@ public:
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
inline explicit Hyperplane(const Hyperplane<OtherScalarType,AmbientDimAtCompileTime>& other)
{ m_coeffs = other.coeffs().template cast<OtherScalarType>(); }
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -118,8 +118,8 @@ public:
template<typename OtherScalarType>
inline explicit ParametrizedLine(const ParametrizedLine<OtherScalarType,AmbientDimAtCompileTime>& other)
{
m_origin = other.origin().template cast<OtherScalarType>();
m_direction = other.direction().template cast<OtherScalarType>();
m_origin = other.origin().template cast<Scalar>();
m_direction = other.direction().template cast<Scalar>();
}
/** \returns \c true if \c *this is approximately equal to \a other, within the precision

View File

@@ -207,7 +207,7 @@ public:
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
inline explicit Quaternion(const Quaternion<OtherScalarType>& other)
{ m_coeffs = other.coeffs().template cast<OtherScalarType>(); }
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -140,7 +140,7 @@ public:
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
inline explicit Scaling(const Scaling<OtherScalarType,Dim>& other)
{ m_coeffs = other.coeffs().template cast<OtherScalarType>(); }
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -271,7 +271,7 @@ public:
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
inline explicit Transform(const Transform<OtherScalarType,Dim>& other)
{ m_matrix = other.matrix().template cast<OtherScalarType>(); }
{ m_matrix = other.matrix().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -143,7 +143,7 @@ public:
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
inline explicit Translation(const Translation<OtherScalarType,Dim>& other)
{ m_coeffs = other.vector().template cast<OtherScalarType>(); }
{ m_coeffs = other.vector().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.