DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CircleFrom2Points.ih
1 
30 
31 #include <cstdlib>
33 
35 // IMPLEMENTATION of inline methods.
37 
39 // ----------------------- Standard services ------------------------------
40 
41 template <typename TPoint>
42 inline
44 {
45 }
46 
47 template <typename TPoint>
48 inline
50 {
51 }
52 
53 template <typename TPoint>
54 inline
55 void
57  const Point& aFirstPoint,
58  const Point& aSecondPoint)
59 {
60  myP = aFirstPoint;
61  myQ = aSecondPoint;
62 }
63 
64 
65 template <typename TPoint>
66 inline
68  const Point& aPole,
69  const Point& aFirstPoint,
70  const Point& aSecondPoint):
71  myPole(aPole),
72  myP(aFirstPoint),
73  myQ(aSecondPoint)
74 {
75 }
76 
77 
78 template <typename TPoint>
79 inline
81  const CircleFrom2Points & other):
82  myPole(other.myPole),
83  myP(other.myP),
84  myQ(other.myQ)
85 {
86 }
87 
88 
89 template <typename TPoint>
90 inline
93  const CircleFrom2Points & other)
94 {
95  myP = other.myP;
96  myQ = other.myQ;
97  myPole = other.myPole;
98  return *this;
99 }
100 
101 
102 
103 template <typename TPoint>
104 inline
107 {
108  CircleFrom3Points<Point> c(myPole,myP,myQ);
109  return c.signedDistance(aP);
110 }
111 
112 template <typename TPoint>
113 inline
114 void
115 DGtal::CircleFrom2Points<TPoint>::getParameters(double& cx, double& cy, double& r) const
116 {
117  CircleFrom3Points<Point> c(myPole,myP,myQ);
118  c.getParameters(cx,cy,r);
119 }
120 
122 // Interface - public :
123 
124 template <typename TPoint>
125 inline
126 std::string
128 {
129  return "CircleFrom2Points";
130 }
131 
132 template <typename TPoint>
133 inline
134 void
136 {
137  out << "[CircleFrom2Points] passing through:\n";
138  out << "pole " << myPole << " and " << myP << myQ;
139 }
140 
141 template <typename TPoint>
142 inline
143 bool
145 {
146  return true;
147 }
148 
149