35 #include <visp3/core/vpFeatureDisplay.h>
36 #include <visp3/core/vpSphere.h>
72 const unsigned int index_0 = 0;
73 const unsigned int index_1 = 1;
74 const unsigned int index_2 = 2;
75 const unsigned int index_3 = 3;
144 const unsigned int index_0 = 0;
145 const unsigned int index_1 = 1;
146 const unsigned int index_2 = 2;
147 const unsigned int index_3 = 3;
148 const unsigned int index_4 = 4;
158 s = (r * r) - (y0 * y0) - (z0 * z0);
160 if ((s = ((z0 * z0) - (r * r))) < 0.0) {
164 p_[0] = (x0 * z0) / s;
165 p_[1] = (y0 * z0) / s;
167 if (fabs(x0) > 1e-6) {
169 double b = r / sqrt(s);
170 double a = ((x0 * x0) + (y0 * y0) + (z0 * z0)) - (r * r);
174 a = (r * sqrt(a)) / s;
175 if (fabs(e) <= 1.0) {
189 B = (r * sqrt(((y0 * y0) + (z0 * z0)) - (r * r))) / s;
222 const unsigned int index_0 = 0;
223 const unsigned int index_1 = 1;
224 const unsigned int index_2 = 2;
225 const unsigned int index_3 = 3;
229 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];
230 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];
231 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];
233 cP_[index_3] =
oP[index_3];
259 const vpColor &color,
unsigned int thickness)
264 const unsigned int index_0 = 0;
265 const unsigned int index_1 = 1;
266 const unsigned int index_2 = 2;
267 const unsigned int index_3 = 3;
268 const unsigned int index_4 = 4;
284 const vpColor &color,
unsigned int thickness)
289 const unsigned int index_0 = 0;
290 const unsigned int index_1 = 1;
291 const unsigned int index_2 = 2;
292 const unsigned int index_3 = 3;
293 const unsigned int index_4 = 4;
306 unsigned int thickness)
308 const unsigned int index_0 = 0;
309 const unsigned int index_1 = 1;
310 const unsigned int index_2 = 2;
311 const unsigned int index_3 = 3;
312 const unsigned int index_4 = 4;
325 unsigned int thickness)
327 const unsigned int index_0 = 0;
328 const unsigned int index_1 = 1;
329 const unsigned int index_2 = 2;
330 const unsigned int index_3 = 3;
331 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).