Bezier
Fast and lightweight class for using the Bezier curves of any order in C++
declarations.h
1 /*
2  * Copyright 2019 Mirko Kokot
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef DECLARATIONS_H
18 #define DECLARATIONS_H
19 
20 #include <Eigen/Dense>
21 #include <vector>
22 
26 namespace Bezier
27 {
36 class Curve;
37 
45 class PolyLine;
46 
54 class PolyCurve;
55 
59 using Point = Eigen::Vector2d;
60 
64 using PointVector = std::vector<Point>;
65 
69 using Vector = Eigen::Vector2d;
70 
74 using BoundingBox = Eigen::AlignedBox2d;
75 
79 const double _epsilon = std::sqrt(std::numeric_limits<double>::epsilon());
80 } // namespace Bezier
81 #endif // DECLARATIONS_H
Bezier::BoundingBox
Eigen::AlignedBox2d BoundingBox
Bounding box class.
Definition: declarations.h:74
Bezier::Point
Eigen::Vector2d Point
Point in xy plane.
Definition: declarations.h:59
Bezier::_epsilon
const double _epsilon
Precision for numerical methods.
Definition: declarations.h:79
Bezier::PointVector
std::vector< Point > PointVector
A vector of Points.
Definition: declarations.h:64
Bezier::Vector
Eigen::Vector2d Vector
A Vector in xy plane.
Definition: declarations.h:69
Bezier
Definition: bezier.h:25