29 struct LieGroupGenericTpl
31 , LieGroupCollection::LieGroupVariant
33 typedef typename LieGroupCollection::LieGroupVariant Base;
34 typedef typename LieGroupCollection::LieGroupVariant LieGroupVariant;
36 typedef typename LieGroupCollection::Scalar Scalar;
39 Options = LieGroupCollection::Options
42 template<
typename LieGroupDerived>
44 : Base(lg_base.derived())
48 template<
typename LieGroup>
49 LieGroupGenericTpl(
const LieGroupVariant & lg_variant)
54 LieGroupGenericTpl(
const LieGroupGenericTpl & lg_generic) =
default;
55 LieGroupGenericTpl & operator=(
const LieGroupGenericTpl & other) =
default;
57 const LieGroupVariant & toVariant()
const 59 return static_cast<const LieGroupVariant &
>(*this);
62 LieGroupVariant & toVariant()
64 return static_cast<LieGroupVariant &
>(*this);
67 bool isEqual_impl(
const LieGroupGenericTpl & other)
const 69 return boost::apply_visitor(
70 visitor::LieGroupEqual<Scalar, Options>(), toVariant(), other.toVariant());
75 return ::pinocchio::nq(*
this);
79 return ::pinocchio::nv(*
this);
82 bool operator==(
const LieGroupGenericTpl & other)
const 84 return isEqual_impl(other);
87 bool operator!=(
const LieGroupGenericTpl & other)
const 89 return this->isDifferent_impl(other);
92 std::string
name()
const 94 return LieGroupNameVisitor::run(*
this);