40 #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;
150 const unsigned int index_0 = 0;
151 const unsigned int index_1 = 1;
152 const unsigned int index_2 = 2;
158 D = -((A * P[0]) + (B * P[1]) + (C * P[index_2]));
177 const unsigned int index_0 = 0;
178 const unsigned int index_1 = 1;
179 const unsigned int index_2 = 2;
216 double norm = sqrt((A * A) + (B * B) + (C * C));
237 init(P, Q, R, frame);
261 const unsigned int index_0 = 0;
262 const unsigned int index_1 = 1;
263 const unsigned int index_2 = 2;
284 const unsigned int index_0 = 0;
285 const unsigned int index_1 = 1;
286 const unsigned int index_2 = 2;
307 rho = -((A * x0) + (B * y0) + (C * z0) + D) / ((A * A) + (B * B) + (C * C));
309 Pproj.
set_X(x0 + (A * rho));
310 Pproj.
set_Y(y0 + (B * rho));
311 Pproj.
set_Z(z0 + (C * rho));
318 const unsigned int index_0 = 0;
319 const unsigned int index_1 = 1;
320 const unsigned int index_2 = 2;
323 if ((std::fabs(M0.
get_X()) > std::numeric_limits<double>::epsilon()) ||
324 (std::fabs(M0.
get_Y()) > std::numeric_limits<double>::epsilon()) ||
325 (std::fabs(M0.
get_Z()) > std::numeric_limits<double>::epsilon())) {
331 scal = (
getA() * R[index_0]) + (
getB() * R[index_1]) + (
getC() * R[index_2]);
333 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
340 H[index_0] = M0.
get_X() + (k * R[index_0]);
341 H[index_1] = M0.
get_Y() + (k * R[index_1]);
342 H[index_2] = M0.
get_Z() + (k * R[index_2]);
347 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
353 H[index_0] = k * M1.
get_X();
354 H[index_1] = k * M1.
get_Y();
355 H[index_2] = k * M1.
get_Z();
364 const unsigned int index_0 = 0;
365 const unsigned int index_1 = 1;
366 const unsigned int index_2 = 2;
368 scal = (A * M1[index_0]) + (B * M1[index_1]) + (C * M1[index_2]);
370 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
376 H[index_0] = k * M1[index_0];
377 H[index_1] = k * M1[index_1];
378 H[index_2] = k * M1[index_2];
398 const unsigned int index_0 = 0;
399 const unsigned int index_1 = 1;
400 const unsigned int index_2 = 2;
401 const unsigned int index_3 = 3;
402 A = (cMo[index_0][0] * Ao) + (cMo[index_0][1] * Bo) + (cMo[index_0][index_2] * Co);
403 B = (cMo[index_1][0] * Ao) + (cMo[index_1][1] * Bo) + (cMo[index_1][index_2] * Co);
404 C = (cMo[index_2][0] * Ao) + (cMo[index_2][1] * Bo) + (cMo[index_2][index_2] * Co);
405 D = Do - ((cMo[index_0][index_3] * A) + (cMo[index_1][index_3] * B) + (cMo[index_2][index_3] * C));
416 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)
void projectionPointOnPlan(const vpPoint &P, vpPoint &Pproj) const
double computeZ(double x, double y) const
vpColVector getNormal() const
vpPlane & operator=(const vpPlane &f)
void init(const vpPoint &P, const vpPoint &Q, const vpPoint &R, vpPlaneFrame frame=camera_frame)
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_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.
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_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_Z(double cZ)
Set the point cZ coordinate in the camera 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.