mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Move the Base typedef's from private to public scope
Move the Quaternion::Base typedef from private to public scope so that one may create child classes of Quaternion. NOTE: This matches the semantics of MatrixBase.
This commit is contained in:
parent
ce99b502ce
commit
804ef2350d
@ -34,8 +34,9 @@ struct quaternionbase_assign_impl;
|
|||||||
template<class Derived>
|
template<class Derived>
|
||||||
class QuaternionBase : public RotationBase<Derived, 3>
|
class QuaternionBase : public RotationBase<Derived, 3>
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
typedef RotationBase<Derived, 3> Base;
|
typedef RotationBase<Derived, 3> Base;
|
||||||
public:
|
|
||||||
using Base::operator*;
|
using Base::operator*;
|
||||||
using Base::derived;
|
using Base::derived;
|
||||||
|
|
||||||
@ -223,10 +224,10 @@ struct traits<Quaternion<_Scalar,_Options> >
|
|||||||
template<typename _Scalar, int _Options>
|
template<typename _Scalar, int _Options>
|
||||||
class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
|
class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;
|
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;
|
||||||
enum { IsAligned = internal::traits<Quaternion>::IsAligned };
|
enum { IsAligned = internal::traits<Quaternion>::IsAligned };
|
||||||
|
|
||||||
public:
|
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion)
|
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion)
|
||||||
@ -334,9 +335,9 @@ template<typename _Scalar, int _Options>
|
|||||||
class Map<const Quaternion<_Scalar>, _Options >
|
class Map<const Quaternion<_Scalar>, _Options >
|
||||||
: public QuaternionBase<Map<const Quaternion<_Scalar>, _Options> >
|
: public QuaternionBase<Map<const Quaternion<_Scalar>, _Options> >
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
typedef QuaternionBase<Map<const Quaternion<_Scalar>, _Options> > Base;
|
typedef QuaternionBase<Map<const Quaternion<_Scalar>, _Options> > Base;
|
||||||
|
|
||||||
public:
|
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
||||||
@ -371,9 +372,9 @@ template<typename _Scalar, int _Options>
|
|||||||
class Map<Quaternion<_Scalar>, _Options >
|
class Map<Quaternion<_Scalar>, _Options >
|
||||||
: public QuaternionBase<Map<Quaternion<_Scalar>, _Options> >
|
: public QuaternionBase<Map<Quaternion<_Scalar>, _Options> >
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
typedef QuaternionBase<Map<Quaternion<_Scalar>, _Options> > Base;
|
typedef QuaternionBase<Map<Quaternion<_Scalar>, _Options> > Base;
|
||||||
|
|
||||||
public:
|
|
||||||
typedef _Scalar Scalar;
|
typedef _Scalar Scalar;
|
||||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||||
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user