DGtal 1.3.0
Loading...
Searching...
No Matches
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//////////////////////////////////////////////////////////////////////////////
34template <typename TCurve, typename TTransfromation>
35inline
36DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::DecoratorParametricCurveTransformation
37( const TCurve & c, const TTransfromation & t ) : curve ( c ), trans ( t ) {}
38
39
40///////////////////////////////////////////////////////////////////////////////
41// Implementation of inline methods //
42template <typename TCurve, typename TTransfromation>
43inline
44typename DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::RealPoint
45DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::x ( const double t ) const
46{
47 return trans ( curve.x ( t ) );
48}
49
50template <typename TCurve, typename TTransfromation>
51inline
52typename DGtal::DecoratorParametricCurveTransformation<TCurve, TTransfromation>::RealPoint
53DGtal::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 */
67template <typename TCurve, typename TTransfromation>
68inline
69std::ostream&
70DGtal::operator<< ( std::ostream & out,
71 const DecoratorParametricCurveTransformation < TCurve, TTransfromation > & object )
72{
73 object.selfDisplay ( out );
74 return out;
75}
76
77// //
78///////////////////////////////////////////////////////////////////////////////
79
80