41 #include <visp3/core/vpPlane.h>
152 D = -((
A * P[0]) + (
B * P[1]) + (
C * P[2]));
207 double norm = sqrt((
A *
A) + (
B *
B) + (
C *
C));
228 init(P, Q, R, frame);
292 rho = -((
A * x0) + (
B * y0) + (
C * z0) +
D) / ((
A *
A) + (
B *
B) + (
C *
C));
294 Pproj.
set_X(x0 + (
A * rho));
295 Pproj.
set_Y(y0 + (
B * rho));
296 Pproj.
set_Z(z0 + (
C * rho));
306 if ((std::fabs(M0.
get_X()) > std::numeric_limits<double>::epsilon()) ||
307 (std::fabs(M0.
get_Y()) > std::numeric_limits<double>::epsilon()) ||
308 (std::fabs(M0.
get_Z()) > std::numeric_limits<double>::epsilon())) {
314 scal = (
getA() * R[0]) + (
getB() * R[1]) + (
getC() * R[2]);
316 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
323 H[0] = M0.
get_X() + (k * R[0]);
324 H[1] = M0.
get_Y() + (k * R[1]);
325 H[2] = M0.
get_Z() + (k * R[2]);
330 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
336 H[0] = k * M1.
get_X();
337 H[1] = k * M1.
get_Y();
338 H[2] = k * M1.
get_Z();
349 scal = (
A * M1[0]) + (
B * M1[1]) + (
C * M1[2]);
351 if (std::fabs(scal) > std::numeric_limits<double>::epsilon()) {
375 double Ao =
A, Bo =
B, Co =
C, Do =
D;
376 A = (cMo[0][0] * Ao) + (cMo[0][1] * Bo) + (cMo[0][2] * Co);
377 B = (cMo[1][0] * Ao) + (cMo[1][1] * Bo) + (cMo[1][2] * Co);
378 C = (cMo[2][0] * Ao) + (cMo[2][1] * Bo) + (cMo[2][2] * Co);
379 D = Do - ((cMo[0][3] *
A) + (cMo[1][3] *
B) + (cMo[2][3] *
C));
390 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.