ToolMap
Loading...
Searching...
No Matches
bezierethz.h
1/***************************************************************************
2 bezierethz
3 -------------------
4 copyright : (C) 2013 CREALP Lucien Schreiber
5 ***************************************************************************/
6
7/***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef _BEZIER_ETHZ_H_
17#define _BEZIER_ETHZ_H_
18
19#include <wx/wxprec.h>
20
21#ifndef WX_PRECOMP
22#include <wx/wx.h>
23#endif
24
25WX_DECLARE_LIST(wxRealPoint, wxRealPointList);
26
28 public:
29 BezierEthz(double width, int maxpoints);
30
32
33 void Init(wxRealPoint P1, wxRealPoint P2, wxRealPoint P3, wxRealPoint P4);
34
35 wxRealPointList* GetPointListRef() {
36 return &m_Points;
37 }
38
39 private:
40 double m_Width;
41 int m_MaxPoints;
42 wxRealPointList m_Points;
43
44 void _BezierPoint(const wxRealPoint& A, const wxRealPoint& B, wxRealPoint& result, double t);
45
46 bool _Segmentation(const wxRealPoint& P1, const wxRealPoint& P2, const wxRealPoint& P3, const wxRealPoint& P4,
47 double t, wxRealPoint& result);
48
49 bool _IsPointUsefull(const wxRealPoint& PBefore, const wxRealPoint& P, const wxRealPoint& PAfter);
50};
51
52#endif
Definition bezierethz.h:27