45 #include <visp3/core/vpPlane.h> 154 D = -(
A * P[0] +
B * P[1] +
C * P[2]);
206 double norm = sqrt(
A *
A +
B *
B +
C *
C);
227 init(P, Q, R, frame);
281 rho = -(
A * x0 +
B * y0 +
C * z0 +
D) / (
A *
A +
B *
B +
C *
C);
283 Pproj.
set_X(x0 +
A * rho);
284 Pproj.
set_Y(y0 +
B * rho);
285 Pproj.
set_Z(z0 + C * rho);
295 if (std::fabs(M0.
get_X()) > std::numeric_limits<double>::epsilon() ||
296 std::fabs(M0.
get_Y()) > std::numeric_limits<double>::epsilon() ||
297 std::fabs(M0.
get_Z()) > std::numeric_limits<double>::epsilon()) {
305 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
310 H[0] = M0.
get_X() + k * R[0];
311 H[1] = M0.
get_Y() + k * R[1];
312 H[2] = M0.
get_Z() + k * R[2];
316 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
320 H[0] = k * M1.
get_X();
321 H[1] = k * M1.
get_Y();
322 H[2] = k * M1.
get_Z();
333 scal =
A * M1[0] +
B * M1[1] +
C * M1[2];
335 if (std::fabs(scal) > std::numeric_limits<double>::epsilon())
357 double Ao =
A, Bo =
B, Co =
C, Do =
D;
358 A = cMo[0][0] * Ao + cMo[0][1] * Bo + cMo[0][2] * Co;
359 B = cMo[1][0] * Ao + cMo[1][1] * Bo + cMo[1][2] * Co;
360 C = cMo[2][0] * Ao + cMo[2][1] * Bo + cMo[2][2] * Co;
361 D = Do - (cMo[0][3] *
A + cMo[1][3] *
B + cMo[2][3] *
C);
372 return (os <<
"(" << p.
getA() <<
"," << p.
getB() <<
"," << p.
getC() <<
"," << p.
getD() <<
") ");
double get_oY() const
Get the point oY coordinate in the object frame.
vpPlane & operator=(const vpPlane &f)
void set_W(double cW)
Set the point cW coordinate in the camera frame.
static vpColVector cross(const vpColVector &a, const vpColVector &b)
Implementation of an homogeneous matrix and operations on such kind of matrices.
void set_Z(double cZ)
Set the point cZ coordinate in the camera frame.
void projectionPointOnPlan(const vpPoint &P, vpPoint &Pproj) const
double get_oX() const
Get the point oX coordinate in the object frame.
double get_W() const
Get the point cW coordinate in the camera frame.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void set_X(double cX)
Set the point cX coordinate in the camera frame.
void init(const vpPoint &P, const vpPoint &Q, const vpPoint &R, vpPlaneFrame frame=camera_frame)
void changeFrame(const vpHomogeneousMatrix &cMo)
double get_oZ() const
Get the point oZ coordinate in the object frame.
double rayIntersection(const vpPoint &M0, const vpPoint &M1, vpColVector &H) const
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, vpPlane &p)
void resize(unsigned int i, bool flagNullify=true)
double get_X() const
Get the point cX coordinate in the camera frame.
vpColVector getNormal() const
void set_Y(double cY)
Set the point cY coordinate in the camera frame.
Implementation of column vector and the associated operations.
This class defines the container for a plane geometrical structure.
double get_Z() const
Get the point cZ coordinate in the camera frame.
double getIntersection(const vpColVector &M1, vpColVector &H) const
double get_Y() const
Get the point cY coordinate in the camera frame.