DGtal  1.5.beta
DecoratorParametricCurveTransformation.ih
1 /**
2  * This program is free software: you can redistribute it and/or modify
3  * it under the terms of the GNU Lesser General Public License as
4  * published by the Free Software Foundation, either version 3 of the
5  * License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program. If not, see <http://www.gnu.org/licenses/>.
14  *
15  **/
16 
17 /**
18  * @file DecoratorParametricCurveTransformation.ih
19  * @author Kacper Pluta (\c kacper.pluta@esiee.fr )
20  * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France
21  *
22  * @date 2014/10/10
23  *
24  * Implementation of inline methods defined in DecoratorParametricCurveTransformation.h
25  *
26  * This file is part of the DGtal library.
27  */
28 
29 ///////////////////////////////////////////////////////////////////////////////
30 // IMPLEMENTATION of inline methods.
31 ///////////////////////////////////////////////////////////////////////////////
32 
33 //////////////////////////////////////////////////////////////////////////////
34 template <typename TCurve, typename TTransfromation>
35 inline
36 DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::DecoratorParametricCurveTransformation
37 ( const TCurve & c, const TTransfromation & t ) : curve ( c ), trans ( t ) {}
38 
39 
40 ///////////////////////////////////////////////////////////////////////////////
41 // Implementation of inline methods //
42 template <typename TCurve, typename TTransfromation>
43 inline
44 typename DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::RealPoint
45 DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::x ( const double t ) const
46 {
47  return trans ( curve.x ( t ) );
48 }
49 
50 template <typename TCurve, typename TTransfromation>
51 inline
52 typename DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::RealPoint
53 DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::xp ( const double t ) const
54 {
55  return trans ( curve.xp ( t ) );
56 }
57 
58 ///////////////////////////////////////////////////////////////////////////////
59 // Implementation of inline functions and external operators //
60 
61 /**
62  * Overloads 'operator<<' for displaying objects of class 'DecoratorParametricCurveTransformation'.
63  * @param out the output stream where the object is written.
64  * @param object the object of class 'DecoratorParametricCurveTransformation' to write.
65  * @return the output stream after the writing.
66  */
67 template <typename TCurve, typename TTransfromation>
68 inline
69 std::ostream&
70 DGtal::operator<< ( std::ostream & out,
71  const DecoratorParametricCurveTransformation < TCurve, TTransfromation > & object )
72 {
73  object.selfDisplay ( out );
74  return out;
75 }
76 
77 // //
78 ///////////////////////////////////////////////////////////////////////////////
79 
80