/// \brief Exp: se3 -> SE3. /// /// Return the integral of the input spatial velocity during time 1. template <typename D> SE3Tpl<typename D::Scalar, D::Options> exp6(const Eigen::MatrixBase<D> & v) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(D,6); MotionTpl<typename D::Scalar,D::Options> nu(v); return exp6(nu); }
void eval_geometry_calc() { QgsPolyline polyline, polygon_ring; polyline << QgsPoint( 0, 0 ) << QgsPoint( 10, 0 ); polygon_ring << QgsPoint( 2, 1 ) << QgsPoint( 10, 1 ) << QgsPoint( 10, 6 ) << QgsPoint( 2, 6 ) << QgsPoint( 2, 1 ); QgsPolygon polygon; polygon << polygon_ring; QgsFeature fPolygon, fPolyline; fPolyline.setGeometry( QgsGeometry::fromPolyline( polyline ) ); fPolygon.setGeometry( QgsGeometry::fromPolygon( polygon ) ); QgsExpression exp1( "$area" ); QVariant vArea = exp1.evaluate( &fPolygon ); QCOMPARE( vArea.toDouble(), 40. ); QgsExpression exp2( "$length" ); QVariant vLength = exp2.evaluate( &fPolyline ); QCOMPARE( vLength.toDouble(), 10. ); QgsExpression exp3( "$perimeter" ); QVariant vPerimeter = exp3.evaluate( &fPolygon ); QCOMPARE( vPerimeter.toDouble(), 26. ); QgsExpression exp4( "bounds_width($geometry)" ); QVariant vBoundsWidth = exp4.evaluate( &fPolygon ); QCOMPARE( vBoundsWidth.toDouble(), 8.0 ); QgsExpression exp5( "bounds_height($geometry)" ); QVariant vBoundsHeight = exp5.evaluate( &fPolygon ); QCOMPARE( vBoundsHeight.toDouble(), 5.0 ); QgsExpression exp6( "xmin($geometry)" ); QVariant vXMin = exp6.evaluate( &fPolygon ); QCOMPARE( vXMin.toDouble(), 2.0 ); QgsExpression exp7( "xmax($geometry)" ); QVariant vXMax = exp7.evaluate( &fPolygon ); QCOMPARE( vXMax.toDouble(), 10.0 ); QgsExpression exp8( "ymin($geometry)" ); QVariant vYMin = exp8.evaluate( &fPolygon ); QCOMPARE( vYMin.toDouble(), 1.0 ); QgsExpression exp9( "ymax($geometry)" ); QVariant vYMax = exp9.evaluate( &fPolygon ); QCOMPARE( vYMax.toDouble(), 6.0 ); }
SE3Tpl<Scalar,Options> exp6_proxy(const MotionTpl<Scalar,Options> & v) { return exp6(v); }