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
mc_rbdyn::planes_from_polygon
MC_RBDYN_DLLAPI std::vector< Plane > planes_from_polygon(const std::shared_ptr< geos::geom::Geometry > &geometry)
geos
Definition: polygon_utils.h:13
mc_rbdyn::Plane
Definition: polygon_utils.h:43
mc_rbdyn::points_from_polygon
MC_RBDYN_DLLAPI std::vector< Eigen::Vector3d > points_from_polygon(std::shared_ptr< geos::geom::Geometry > geometry)
mc_rbdyn::Plane::offset
double offset
Definition: polygon_utils.h:46
api.h
MC_RBDYN_DLLAPI
#define MC_RBDYN_DLLAPI
Definition: api.h:50
mc_rbdyn
Definition: generic_gripper.h:14
mc_rbdyn::Plane::normal
Eigen::Vector3d normal
Definition: polygon_utils.h:45
mc_rbdyn::QuadraticGenerator
Definition: polygon_utils.h:24