source: rrlib_geometry/curves/tUniformBSplineCurve.h @ 8:2cefb20abdfd

Last change on this file since 8:2cefb20abdfd was 8:2cefb20abdfd, checked in by Tobias Föhst <foehst@…>, 9 years ago

Reformatting to meet code templates

File size: 3.9 KB
Line 
1//
2// You received this file as part of RRLib
3// Robotics Research Library
4//
5// Copyright (C) AG Robotersysteme TU Kaiserslautern
6//
7// This program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public License
9// as published by the Free Software Foundation; either version 2
10// of the License, or (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20//
21//----------------------------------------------------------------------
22/*!\file    tUniformBSplineCurve.h
23 *
24 * \author  Tobias Foehst
25 *
26 * \date    2010-09-01
27 *
28 * \brief   Contains tUniformBSplineCurve
29 *
30 * \b tUniformBSplineCurve
31 *
32 * A few words for tUniformBSplineCurve
33 *
34 */
35//----------------------------------------------------------------------
36#ifndef __rrlib__geometry__curves__tUniformBSplineCurve_h__
37#define __rrlib__geometry__curves__tUniformBSplineCurve_h__
38
39#include "rrlib/geometry/curves/tSplineCurve.h"
40//----------------------------------------------------------------------
41// External includes (system with <>, local with "")
42//----------------------------------------------------------------------
43
44//----------------------------------------------------------------------
45// Internal includes with ""
46//----------------------------------------------------------------------
47
48//----------------------------------------------------------------------
49// Debugging
50//----------------------------------------------------------------------
51
52//----------------------------------------------------------------------
53// Namespace declaration
54//----------------------------------------------------------------------
55namespace rrlib
56{
57namespace geometry
58{
59
60//----------------------------------------------------------------------
61// Forward declarations / typedefs / enums
62//----------------------------------------------------------------------
63
64//----------------------------------------------------------------------
65// Class declaration
66//----------------------------------------------------------------------
67//! Short description of tLine
68/*! A more detailed description of tUniformBSplineCurve, which
69    Tobias Foehst hasn't done yet !!
70*/
71template <size_t Tdimension, typename TElement>
72class tUniformBSplineCurve : public tSplineCurve<Tdimension, TElement, 3>
73{
74  typedef geometry::tSplineCurve<Tdimension, TElement, 3> tSplineCurve;
75  typedef geometry::tShape<Tdimension, TElement> tShape;
76
77//----------------------------------------------------------------------
78// Public methods and typedefs
79//----------------------------------------------------------------------
80public:
81
82  template <typename TIterator>
83  tUniformBSplineCurve(TIterator begin, TIterator end, double tension = 0.0);
84
85  template <typename TSTLContainer>
86  explicit tUniformBSplineCurve(const TSTLContainer &control_points, double tension = 0.0);
87
88  inline double GetTension() const
89  {
90    return this->tension;
91  }
92
93  void SetTension(double tension);
94
95  virtual const typename tSplineCurve::tBezierCurve GetBezierCurveForSegment(unsigned int i) const;
96
97//----------------------------------------------------------------------
98// Private fields and methods
99//----------------------------------------------------------------------
100private:
101
102  double tension;
103
104};
105
106//----------------------------------------------------------------------
107// End of namespace declaration
108//----------------------------------------------------------------------
109}
110}
111
112
113#include "rrlib/geometry/curves/tUniformBSplineCurve.hpp"
114
115#endif
Note: See TracBrowser for help on using the repository browser.