35 #include <visp3/core/vpFeatureDisplay.h>
36 #include <visp3/core/vpSphere.h>
44 const unsigned int val_4 = 4;
45 const unsigned int val_5 = 5;
74 const unsigned int index_0 = 0;
75 const unsigned int index_1 = 1;
76 const unsigned int index_2 = 2;
77 const unsigned int index_3 = 3;
143 const unsigned int val_5 = 5;
147 const unsigned int index_0 = 0;
148 const unsigned int index_1 = 1;
149 const unsigned int index_2 = 2;
150 const unsigned int index_3 = 3;
151 const unsigned int index_4 = 4;
161 s = (r * r) - (y0 * y0) - (z0 * z0);
163 if ((s = ((z0 * z0) - (r * r))) < 0.0) {
167 p_[0] = (x0 * z0) / s;
168 p_[1] = (y0 * z0) / s;
170 if (fabs(x0) > 1e-6) {
172 double b = r / sqrt(s);
173 double a = ((x0 * x0) + (y0 * y0) + (z0 * z0)) - (r * r);
177 a = (r * sqrt(a)) / s;
178 if (fabs(e) <= 1.0) {
192 B = (r * sqrt(((y0 * y0) + (z0 * z0)) - (r * r))) / s;
223 const unsigned int val_4 = 4;
226 const unsigned int index_0 = 0;
227 const unsigned int index_1 = 1;
228 const unsigned int index_2 = 2;
229 const unsigned int index_3 = 3;
233 x0 = (cMo[index_0][0] *
oP[0]) + (cMo[index_0][1] *
oP[1]) + (cMo[index_0][index_2] *
oP[index_2]) + cMo[index_0][index_3];
234 y0 = (cMo[index_1][0] *
oP[0]) + (cMo[index_1][1] *
oP[1]) + (cMo[index_1][index_2] *
oP[index_2]) + cMo[index_1][index_3];
235 z0 = (cMo[index_2][0] *
oP[0]) + (cMo[index_2][1] *
oP[1]) + (cMo[index_2][index_2] *
oP[index_2]) + cMo[index_2][index_3];
237 cP_[index_3] =
oP[index_3];
263 const vpColor &color,
unsigned int thickness)
268 const unsigned int index_0 = 0;
269 const unsigned int index_1 = 1;
270 const unsigned int index_2 = 2;
271 const unsigned int index_3 = 3;
272 const unsigned int index_4 = 4;
288 const vpColor &color,
unsigned int thickness)
293 const unsigned int index_0 = 0;
294 const unsigned int index_1 = 1;
295 const unsigned int index_2 = 2;
296 const unsigned int index_3 = 3;
297 const unsigned int index_4 = 4;
310 unsigned int thickness)
312 const unsigned int index_0 = 0;
313 const unsigned int index_1 = 1;
314 const unsigned int index_2 = 2;
315 const unsigned int index_3 = 3;
316 const unsigned int index_4 = 4;
329 unsigned int thickness)
331 const unsigned int index_0 = 0;
332 const unsigned int index_1 = 1;
333 const unsigned int index_2 = 2;
334 const unsigned int index_3 = 3;
335 const unsigned int index_4 = 4;
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
error that can be emitted by ViSP classes.
static void displayEllipse(double x, double y, double n20, double n11, double n02, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
Implementation of an homogeneous matrix and operations on such kind of matrices.
static double sqr(double x)
Class that defines a 3D sphere in the object frame and allows forward projection of a 3D sphere in th...
void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1) VP_OVERRIDE
void setWorldCoordinates(const vpColVector &oP) VP_OVERRIDE
void projection() VP_OVERRIDE
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP) const VP_OVERRIDE
vpSphere * duplicate() const VP_OVERRIDE
For memory issue (used by the vpServo class only).