Mondschein Engine  0.3.0
beziercurve.h
Go to the documentation of this file.
1 #ifndef BEZIERCURVE_H_INCLUDED
2 #define BEZIERCURVE_H_INCLUDED
3 
4 /* Mondschein Engine is a fast, powerful, and easy-to-use 3D realtime rendering engine.
5  *
6  * Copyright (C) 2009-2013 by Andreas Amereller
7  * E-Mail: andreas.amereller.dev@googlemail.com
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the Free
11  * Software Foundation; either version 3 of the License, or (at your option)
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17  * more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
24 
25 #include "types.h"
26 #include "eigen3.h"
27 
28 namespace mondschein
29 {
30  namespace math
31  {
41  {
42  private:
43  std::vector<Eigen::Vector4d> points;
44 
45  public:
46  /* Constructors and destructor
47  * These members are not documented since they should only be used by creation functions
48  */
49  explicit Beziercurve();
50  explicit Beziercurve(const std::vector<Eigen::Vector4d> &_p);
51  explicit Beziercurve(Beziercurve_c _c);
52  virtual ~Beziercurve();
53  virtual Beziercurve &operator=(Beziercurve_c _c);
54 
64  virtual Eigen::Vector3d operator()(float64 _t) const;
65 
71  virtual void set_points(const std::vector<Eigen::Vector4d> &_p);
72 
78  virtual std::vector<Eigen::Vector4d> get_points() const;
79 
85  virtual uint32 get_degree() const;
86 
96  virtual Eigen::Vector3d get_point(float64 _t) const;
97  };
98  }
99 }
100 #endif // BEZIERCURVE_H_INCLUDED