diff options
Diffstat (limited to 'unsupported/Eigen/AlignedVector3')
-rw-r--r-- | unsupported/Eigen/AlignedVector3 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/unsupported/Eigen/AlignedVector3 b/unsupported/Eigen/AlignedVector3 index 7b45e6cce..1fce00525 100644 --- a/unsupported/Eigen/AlignedVector3 +++ b/unsupported/Eigen/AlignedVector3 @@ -57,6 +57,11 @@ template<typename _Scalar> class AlignedVector3 inline Index rows() const { return 3; } inline Index cols() const { return 1; } + + Scalar* data() { return m_coeffs.data(); } + const Scalar* data() const { return m_coeffs.data(); } + Index innerStride() const { return 1; } + Index outerStride() const { return m_coeffs.outerStride(); } inline const Scalar& coeff(Index row, Index col) const { return m_coeffs.coeff(row, col); } @@ -181,8 +186,28 @@ template<typename _Scalar> class AlignedVector3 { return m_coeffs.template head<3>().isApprox(other,eps); } + + CoeffType& coeffs() { return m_coeffs; } + const CoeffType& coeffs() const { return m_coeffs; } }; +namespace internal { + +template<typename Scalar> +struct evaluator<AlignedVector3<Scalar> > + : evaluator<Matrix<Scalar,4,1> >::type +{ + typedef AlignedVector3<Scalar> XprType; + typedef typename evaluator<Matrix<Scalar,4,1> >::type Base; + + typedef evaluator type; + typedef evaluator nestedType; + + evaluator(const XprType &m) : Base(m.coeffs()) {} +}; + +} + //@} } |