42 #include <visp3/core/vpPlane.h>
151 D = -(
A * P[0] +
B * P[1] +
C * P[2]);
203 double norm = sqrt(
A *
A +
B *
B +
C *
C);
224 init(P, Q, R, frame);
288 rho = -(
A * x0 +
B * y0 +
C * z0 +
D) / (
A *
A +
B *
B +
C *
C);
290 Pproj.
set_X(x0 +
A * rho);
291 Pproj.
set_Y(y0 +
B * rho);
292 Pproj.
set_Z(z0 +
C * rho);
302 if (std::fabs(M0.
get_X()) > std::numeric_limits<double>::epsilon() ||
303 std::fabs(M0.
get_Y()) > std::numeric_limits<double>::epsilon() ||
304 std::fabs(M0.
get_Z()) > std::numeric_limits<double>::epsilon()) {
312 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
317 H[0] = M0.
get_X() + k * R[0];
318 H[1] = M0.
get_Y() + k * R[1];
319 H[2] = M0.
get_Z() + k * R[2];
323 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
327 H[0] = k * M1.
get_X();
328 H[1] = k * M1.
get_Y();
329 H[2] = k * M1.
get_Z();
340 scal =
A * M1[0] +
B * M1[1] +
C * M1[2];
342 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
364 double Ao =
A, Bo =
B, Co =
C, Do =
D;
365 A = cMo[0][0] * Ao + cMo[0][1] * Bo + cMo[0][2] * Co;
366 B = cMo[1][0] * Ao + cMo[1][1] * Bo + cMo[1][2] * Co;
367 C = cMo[2][0] * Ao + cMo[2][1] * Bo + cMo[2][2] * Co;
368 D = Do - (cMo[0][3] *
A + cMo[1][3] *
B + cMo[2][3] *
C);
379 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.