本文整理汇总了C++中RotationBase类的典型用法代码示例。如果您正苦于以下问题:C++ RotationBase类的具体用法?C++ RotationBase怎么用?C++ RotationBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RotationBase类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rotate
inline static typename get_matrix3X<Rotation_>::template Matrix3X<Cols> rotate(const RotationBase<Rotation_, Usage_>& rotation, const typename internal::get_matrix3X<Rotation_>::template Matrix3X<Cols>& m) {
if(Usage_ == RotationUsage::ACTIVE) {
return eigen_impl::RotationMatrix<typename Rotation_::Scalar, Usage_>(rotation.derived()).toImplementation()*m;
} else {
return eigen_impl::RotationMatrix<typename Rotation_::Scalar, Usage_>(rotation.derived().inverted()).toImplementation()*m;
}
}
示例2: EulerAnglesZyxDiff
inline explicit EulerAnglesZyxDiff(const RotationBase<RotationDerived_, Usage_>& rotation, const RotationDiffBase<OtherDerived_, Usage_>& other)
: zyxDiff_(internal::RotationDiffConversionTraits<EulerAnglesZyxDiff, OtherDerived_, RotationDerived_>::convert(rotation.derived(), other.derived()).toImplementation()){
}
示例3: cast
OtherDerived_ cast(const RotationBase<RotationDerived_, Usage_>& rotation) const {
return internal::RotationDiffConversionTraits<OtherDerived_, EulerAnglesZyxDiff, RotationDerived_>::convert(rotation.derived(), *this);
}
示例4: mult
//! Default multiplication of rotations converts the representations of the rotations to rotation quaternions and multiplies them
inline static Left_ mult(const RotationBase<Left_, Usage_>& lhs, const RotationBase<Right_, Usage_>& rhs) {
if(Usage_ == RotationUsage::ACTIVE) {
return Left_(typename eigen_impl::RotationQuaternion<typename Left_::Scalar, Usage_>(
(typename eigen_impl::RotationQuaternion<typename Left_::Scalar, Usage_>(lhs.derived())).toImplementation() *
(typename eigen_impl::RotationQuaternion<typename Right_::Scalar, Usage_>(rhs.derived())).toImplementation()
));
} else {
return Left_(typename eigen_impl::RotationQuaternion<typename Left_::Scalar, Usage_>(
(typename eigen_impl::RotationQuaternion<typename Right_::Scalar, Usage_>(rhs.derived())).toImplementation() *
(typename eigen_impl::RotationQuaternion<typename Left_::Scalar, Usage_>(lhs.derived())).toImplementation()
));
}
}
示例5: box_plus
inline static Left_ box_plus(const RotationBase<Left_, Usage_>& rotation, const typename internal::get_matrix3X<Left_>::template Matrix3X<1>& vector) {
return Left_(MapTraits<RotationBase<Left_,Usage_>>::set_exponential_map(vector)*rotation.derived());
}
示例6: get_disparity_angle
/*! \brief Gets the disparity angle between two rotations.
*
* The disparity angle is defined as the angle of the angle-axis representation of the concatenation of
* the first rotation and the inverse of the second rotation. If the disparity angle is zero,
* the rotations are equal.
* \returns disparity angle in [-pi,pi) @todo: is this range correct?
*/
inline static typename Left_::Scalar get_disparity_angle(const RotationBase<Left_, Usage_>& left, const RotationBase<Right_, Usage_>& right) {
return fabs(common::floatingPointModulo(eigen_impl::AngleAxis<typename Left_::Scalar, Usage_>(left.derived()*right.derived().inverted()).angle() + M_PI,2*M_PI)-M_PI);
}
示例7: box_minus
inline static typename internal::get_matrix3X<Left_>::template Matrix3X<1> box_minus(const RotationBase<Left_, Usage_>& lhs, const RotationBase<Right_, Usage_>& rhs) {
return (lhs.derived()*rhs.derived().inverted()).logarithmicMap();
}
示例8: boxMinus
typename internal::get_matrix3X<Derived_>::template Matrix3X<1> boxMinus(const RotationBase<OtherDerived_>& other) const {
return internal::BoxOperationTraits<RotationBase<Derived_>, RotationBase<OtherDerived_>>::box_minus(this->derived(), other.derived());
}
示例9: EulerAnglesXyz
inline explicit EulerAnglesXyz(const RotationBase<OtherDerived_>& other)
: xyz_(internal::ConversionTraits<EulerAnglesXyz, OtherDerived_>::convert(other.derived()).toImplementation()) {
}
示例10: getDisparityAngle
typename internal::get_scalar<Derived_>::Scalar getDisparityAngle(const RotationBase<OtherDerived_>& other) const {
return internal::DisparityAngleTraits<RotationBase<Derived_>, RotationBase<OtherDerived_>>::compute(this->derived(), other.derived());
}
示例11:
bool operator ==(const RotationBase<OtherDerived_>& other) const { // todo: may be optimized
return internal::ComparisonTraits<RotationBase<Derived_>, RotationBase<OtherDerived_>>::isEqual(this->derived().getUnique(), other.derived().getUnique()); // the type conversion must already take place here to ensure the specialised isequal function is called more often
}
示例12: getPassive
inline static typename get_other_usage<Derived_>::OtherUsage getPassive(const RotationBase<Derived_,RotationUsage::ACTIVE>& in) {
return typename get_other_usage<Derived_>::OtherUsage(in.derived().inverted().toImplementation());
}
示例13: getDisparityAngle
typename internal::get_scalar<Derived_>::Scalar getDisparityAngle(const RotationBase<OtherDerived_,Usage_>& other) const {
return internal::ComparisonTraits<RotationBase<Derived_, Usage_>, RotationBase<OtherDerived_, Usage_>>::get_disparity_angle(this->derived(), other.derived());
}