mc_rtc  2.12.0
polygon_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2019 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 #include <mc_rbdyn/api.h>
8 
9 #include <Eigen/Geometry>
10 #include <memory>
11 #include <vector>
12 
13 namespace geos
14 {
15 namespace geom
16 {
17 class Geometry;
18 }
19 } // namespace geos
20 
21 namespace mc_rbdyn
22 {
23 
25 {
26  QuadraticGenerator(double start, double end, unsigned int nrSteps, unsigned int proportion = 4);
27 
28  void next(double & percentOut, double & speedOut);
29 
30 private:
31  double start;
32  double end;
33  unsigned int nrSteps_;
34  unsigned int proportion;
35  unsigned int current;
36  double s1;
37  double s2;
38  unsigned int t1;
39  unsigned int t2;
40  double max_speed;
41 };
42 
44 {
45  Eigen::Vector3d normal;
46  double offset;
47 };
48 
49 MC_RBDYN_DLLAPI std::vector<Plane> planes_from_polygon(const std::shared_ptr<geos::geom::Geometry> & geometry);
50 
51 MC_RBDYN_DLLAPI std::vector<Eigen::Vector3d> points_from_polygon(std::shared_ptr<geos::geom::Geometry> geometry);
52 
53 } // namespace mc_rbdyn
#define MC_RBDYN_DLLAPI
Definition: api.h:50
Definition: polygon_utils.h:14
Definition: generic_gripper.h:15
MC_RBDYN_DLLAPI std::vector< Plane > planes_from_polygon(const std::shared_ptr< geos::geom::Geometry > &geometry)
MC_RBDYN_DLLAPI std::vector< Eigen::Vector3d > points_from_polygon(std::shared_ptr< geos::geom::Geometry > geometry)
Definition: polygon_utils.h:44
double offset
Definition: polygon_utils.h:46
Eigen::Vector3d normal
Definition: polygon_utils.h:45
Definition: polygon_utils.h:25
void next(double &percentOut, double &speedOut)
QuadraticGenerator(double start, double end, unsigned int nrSteps, unsigned int proportion=4)