39 #include <visp3/core/vpPlane.h>
108 const unsigned int index_0 = 0;
109 const unsigned int index_1 = 1;
110 const unsigned int index_2 = 2;
159 const unsigned int index_0 = 0;
160 const unsigned int index_1 = 1;
161 const unsigned int index_2 = 2;
190 const unsigned int index_0 = 0;
191 const unsigned int index_1 = 1;
192 const unsigned int index_2 = 2;
198 D = -((A * P[0]) + (B * P[1]) + (C * P[index_2]));
219 const unsigned int index_0 = 0;
220 const unsigned int index_1 = 1;
221 const unsigned int index_2 = 2;
258 double norm = sqrt((A * A) + (B * B) + (C * C));
281 init(P, Q, R, frame);
304 const unsigned int val_3 = 3;
306 const unsigned int index_0 = 0;
307 const unsigned int index_1 = 1;
308 const unsigned int index_2 = 2;
328 const unsigned int val_3 = 3;
330 const unsigned int index_0 = 0;
331 const unsigned int index_1 = 1;
332 const unsigned int index_2 = 2;
359 rho = -((A * x0) + (B * y0) + (C * z0) + D) / ((A * A) + (B * B) + (C * C));
361 Pproj.
set_X(x0 + (A * rho));
362 Pproj.
set_Y(y0 + (B * rho));
363 Pproj.
set_Z(z0 + (C * rho));
371 rho = -((A * x0) + (B * y0) + (C * z0) + D) / ((A * A) + (B * B) + (C * C));
373 Pproj.
set_oX(x0 + (A * rho));
374 Pproj.
set_oY(y0 + (B * rho));
375 Pproj.
set_oZ(z0 + (C * rho));
383 const unsigned int index_0 = 0;
384 const unsigned int index_1 = 1;
385 const unsigned int index_2 = 2;
388 if ((std::fabs(M0.
get_X()) > std::numeric_limits<double>::epsilon()) ||
389 (std::fabs(M0.
get_Y()) > std::numeric_limits<double>::epsilon()) ||
390 (std::fabs(M0.
get_Z()) > std::numeric_limits<double>::epsilon())) {
396 scal = (
getA() * R[index_0]) + (
getB() * R[index_1]) + (
getC() * R[index_2]);
398 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
405 H[index_0] = M0.
get_X() + (k * R[index_0]);
406 H[index_1] = M0.
get_Y() + (k * R[index_1]);
407 H[index_2] = M0.
get_Z() + (k * R[index_2]);
412 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
418 H[index_0] = k * M1.
get_X();
419 H[index_1] = k * M1.
get_Y();
420 H[index_2] = k * M1.
get_Z();
429 const unsigned int index_0 = 0;
430 const unsigned int index_1 = 1;
431 const unsigned int index_2 = 2;
433 scal = (A * M1[index_0]) + (B * M1[index_1]) + (C * M1[index_2]);
435 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
441 H[index_0] = k * M1[index_0];
442 H[index_1] = k * M1[index_1];
443 H[index_2] = k * M1[index_2];
463 const unsigned int index_0 = 0;
464 const unsigned int index_1 = 1;
465 const unsigned int index_2 = 2;
466 const unsigned int index_3 = 3;
467 A = (cMo[index_0][0] * Ao) + (cMo[index_0][1] * Bo) + (cMo[index_0][index_2] * Co);
468 B = (cMo[index_1][0] * Ao) + (cMo[index_1][1] * Bo) + (cMo[index_1][index_2] * Co);
469 C = (cMo[index_2][0] * Ao) + (cMo[index_2][1] * Bo) + (cMo[index_2][index_2] * Co);
470 D = Do - ((cMo[index_0][index_3] * A) + (cMo[index_1][index_3] * B) + (cMo[index_2][index_3] * C));
481 return (os <<
"(" << p.
getA() <<
"," << p.
getB() <<
"," << p.
getC() <<
"," << p.
getD() <<
") ");
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
Implementation of column vector and the associated operations.
static vpColVector cross(const vpColVector &a, const vpColVector &b)
void resize(unsigned int i, bool flagNullify=true)
Implementation of an homogeneous matrix and operations on such kind of matrices.
This class defines the container for a plane geometrical structure.
double rayIntersection(const vpPoint &M0, const vpPoint &M1, vpColVector &H) const
void changeFrame(const vpHomogeneousMatrix &cMo)
vpPlane & init(const vpPoint &P, const vpColVector &normal, vpPlaneFrame frame=camera_frame)
double computeZ(double x, double y) const
void projectionPointOnPlan(const vpPoint &P, vpPoint &Pproj, vpPlaneFrame frame=camera_frame) const
vpColVector getNormal() const
vpPlane & operator=(const vpPlane &f)
double getIntersection(const vpColVector &M1, vpColVector &H) const
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
double get_oW() const
Get the point oW coordinate in the object frame.
double get_oX() const
Get the point oX coordinate in the object frame.
void set_W(double cW)
Set the point cW coordinate in the camera frame.
void set_oW(double oW)
Set the point oW coordinate in the object frame.
double get_Y() const
Get the point cY coordinate in the camera frame.
double get_oZ() const
Get the point oZ coordinate in the object frame.
void set_oY(double oY)
Set the point oY coordinate in the object frame.
void set_X(double cX)
Set the point cX coordinate in the camera frame.
double get_W() const
Get the point cW coordinate in the camera frame.
void set_Y(double cY)
Set the point cY coordinate in the camera frame.
double get_Z() const
Get the point cZ coordinate in the camera frame.
void set_oZ(double oZ)
Set the point oZ coordinate in the object frame.
void set_Z(double cZ)
Set the point cZ coordinate in the camera frame.
void set_oX(double oX)
Set the point oX coordinate in the object frame.
double get_oY() const
Get the point oY coordinate in the object frame.
double get_X() const
Get the point cX coordinate in the camera frame.