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.
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.
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/>.
18 * @file CircleFrom2Points.ih
19 * @author Tristan Roussillon (\c tristan.roussillon@liris.cnrs.fr )
20 * Laboratoire d'InfoRmatique en Image et Systèmes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
24 * @brief Implementation of inline methods defined in CircleFrom2Points.h
26 * This file is part of the DGtal library.
30//////////////////////////////////////////////////////////////////////////////
32//////////////////////////////////////////////////////////////////////////////
34///////////////////////////////////////////////////////////////////////////////
35// IMPLEMENTATION of inline methods.
36///////////////////////////////////////////////////////////////////////////////
38///////////////////////////////////////////////////////////////////////////////
39// ----------------------- Standard services ------------------------------
41template <typename TPoint>
43DGtal::CircleFrom2Points<TPoint>::~CircleFrom2Points()
47template <typename TPoint>
49DGtal::CircleFrom2Points<TPoint>::CircleFrom2Points(const Point& aPole): myPole(aPole)
53template <typename TPoint>
56DGtal::CircleFrom2Points<TPoint>::init(
57 const Point& aFirstPoint,
58 const Point& aSecondPoint)
65template <typename TPoint>
67DGtal::CircleFrom2Points<TPoint>::CircleFrom2Points(
69 const Point& aFirstPoint,
70 const Point& aSecondPoint):
78template <typename TPoint>
80DGtal::CircleFrom2Points<TPoint>::CircleFrom2Points(
81 const CircleFrom2Points & other):
89template <typename TPoint>
91DGtal::CircleFrom2Points<TPoint>&
92DGtal::CircleFrom2Points<TPoint>::operator=(
93 const CircleFrom2Points & other)
97 myPole = other.myPole;
103template <typename TPoint>
105typename DGtal::CircleFrom2Points<TPoint>::Distance
106DGtal::CircleFrom2Points<TPoint>::signedDistance(const Point& aP) const
108 CircleFrom3Points<Point> c(myPole,myP,myQ);
109 return c.signedDistance(aP);
112template <typename TPoint>
115DGtal::CircleFrom2Points<TPoint>::getParameters(double& cx, double& cy, double& r) const
117 CircleFrom3Points<Point> c(myPole,myP,myQ);
118 c.getParameters(cx,cy,r);
121///////////////////////////////////////////////////////////////////////////////
122// Interface - public :
124template <typename TPoint>
127DGtal::CircleFrom2Points<TPoint>::className() const
129 return "CircleFrom2Points";
132template <typename TPoint>
135DGtal::CircleFrom2Points<TPoint>::selfDisplay ( std::ostream & out ) const
137 out << "[CircleFrom2Points] passing through:\n";
138 out << "pole " << myPole << " and " << myP << myQ;
141template <typename TPoint>
144DGtal::CircleFrom2Points<TPoint>::isValid() const