ViSP
2.9.0
|
#include <vpPlane.h>
Public Member Functions | |
vpPlane () | |
vpPlane (const vpPlane &P) | |
vpPlane (const double A, const double B, const double C, const double D) | |
vpPlane (const vpPoint &P, const vpColVector &n) | |
vpPlane (const vpPoint &P, const vpPoint &Q, const vpPoint &R) | |
void | init (const vpPoint &P, const vpPoint &Q, const vpPoint &R) |
void | init (const vpColVector &P, const vpColVector &n) |
void | init (const vpPlane &P) |
void | setA (const double a) |
void | setB (const double b) |
void | setC (const double c) |
void | setD (const double d) |
void | setABCD (const double a, const double b, const double c, const double d) |
vpPlane & | operator= (const vpPlane &f) |
double | getA () const |
double | getB () const |
double | getC () const |
double | getD () const |
vpColVector | getABCD () const |
vpColVector | abcd () const |
vpColVector | getNormal () const |
void | getNormal (vpColVector &n) const |
void | projectionPointOnPlan (const vpPoint &P, vpPoint &Pproj) const |
double | rayIntersection (const vpPoint &M0, const vpPoint &M1, vpColVector &H) const |
double | getIntersection (const vpColVector &M1, vpColVector &H) const |
void | changeFrame (const vpHomogeneousMatrix &cMo) |
Public Attributes | |
double | A |
double | B |
double | C |
double | D |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, vpPlane &p) |
This class defines the container for a plane geometrical structure.
A plane is given by the equation where (x,y,z) are the coordinates of a point and where is a normal vector of the plane.
vpPlane::vpPlane | ( | ) |
Basic constructor that set the plane parameters A, B, C, D to zero.
Definition at line 71 of file vpPlane.cpp.
vpPlane::vpPlane | ( | const vpPlane & | P | ) |
vpPlane::vpPlane | ( | const double | a, |
const double | b, | ||
const double | c, | ||
const double | d | ||
) |
Plane constructor from A, B, C, D parameters.
A plane is given by the equation where (x,y,z) are the coordinates of a point and is the normal vector of the plane.
a,b,c,d | : Parameters of the plane. |
Definition at line 83 of file vpPlane.cpp.
vpPlane::vpPlane | ( | const vpPoint & | P, |
const vpColVector & | n | ||
) |
Plane constructor from a point P on the plane and the normal n to the plane.
A plane is given by the equation where (x,y,z) are the coordinates of a point and is the normal vector of the plane.
P | : A point with coordinates (x,y,z) on the plane. |
n | : The normal to the plane. |
Definition at line 112 of file vpPlane.cpp.
References A, B, C, D, vpPoint::get_X(), vpPoint::get_Y(), and vpPoint::get_Z().
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by n = PQ x PR
Definition at line 204 of file vpPlane.cpp.
References init().
|
inline |
void vpPlane::changeFrame | ( | const vpHomogeneousMatrix & | cMo | ) |
Considering the plane in the Ro frame computes the equation of the plane in the Rc frame.
cMo | : Homogeneous transformation from Rc to Ro frames. |
Definition at line 344 of file vpPlane.cpp.
Referenced by vpMbKltTracker::setPose().
|
inline |
Definition at line 111 of file vpPlane.h.
Referenced by init(), rayIntersection(), and vpPlane().
|
inline |
|
inline |
Definition at line 113 of file vpPlane.h.
Referenced by init(), rayIntersection(), and vpPlane().
|
inline |
Definition at line 115 of file vpPlane.h.
Referenced by init(), rayIntersection(), and vpPlane().
|
inline |
Definition at line 117 of file vpPlane.h.
Referenced by getIntersection(), init(), vpMbtKltPolygon::init(), rayIntersection(), vpMbKltTracker::setPose(), and vpPlane().
double vpPlane::getIntersection | ( | const vpColVector & | M1, |
vpColVector & | H | ||
) | const |
vpColVector vpPlane::getNormal | ( | ) | const |
Return the normal to the plane.
A plane is given by the equation where (x,y,z) is a point of R^3 and (A,B,C) are the coordinates of the normal.
Definition at line 218 of file vpPlane.cpp.
Referenced by vpMbtKltPolygon::init(), and vpMbKltTracker::setPose().
void vpPlane::getNormal | ( | vpColVector & | n | ) | const |
Return the normal to the plane.
A plane is given by the equation where (x,y,z) are the coordinates of a point and is normal vector of the plane.
Definition at line 238 of file vpPlane.cpp.
References A, B, C, and vpColVector::resize().
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by n = PQ x PR
Definition at line 164 of file vpPlane.cpp.
References A, B, C, vpColVector::cross(), D, vpPoint::get_X(), vpPoint::get_Y(), and vpPoint::get_Z().
Referenced by vpPlane().
void vpPlane::init | ( | const vpColVector & | P, |
const vpColVector & | n | ||
) |
Initialize the plane from a point P on the plane and the normal n to the plane.
P | : A point with coordinates (x,y,z) on the plane. |
n | : The normal to the plane. |
Definition at line 146 of file vpPlane.cpp.
void vpPlane::init | ( | const vpPlane & | P | ) |
Compute the coordinates of the projection of a point on the plane.
P | : point to be projected on the plane |
Pproj | : result of the projection (pproj belongs to the plane) |
Definition at line 253 of file vpPlane.cpp.
References A, B, C, D, vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().
double vpPlane::rayIntersection | ( | const vpPoint & | M0, |
const vpPoint & | M1, | ||
vpColVector & | H | ||
) | const |
Definition at line 272 of file vpPlane.cpp.
References vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), getA(), getB(), getC(), and getD().
|
inline |
|
inline |
Set plane parameters A, B, C, D.
|
inline |
|
inline |
|
inline |
|
friend |
Print the plane parameters as a stream like "(A,B,C,D) " where A,B,C and D correspond to the parameters of the plane.
Definition at line 360 of file vpPlane.cpp.
double vpPlane::A |
Definition at line 76 of file vpPlane.h.
Referenced by changeFrame(), getIntersection(), getNormal(), init(), operator=(), projectionPointOnPlan(), and vpPlane().
double vpPlane::B |
Definition at line 76 of file vpPlane.h.
Referenced by changeFrame(), getIntersection(), getNormal(), init(), operator=(), projectionPointOnPlan(), and vpPlane().
double vpPlane::C |
Definition at line 76 of file vpPlane.h.
Referenced by changeFrame(), getIntersection(), getNormal(), init(), operator=(), projectionPointOnPlan(), and vpPlane().
double vpPlane::D |
Definition at line 76 of file vpPlane.h.
Referenced by changeFrame(), init(), operator=(), projectionPointOnPlan(), and vpPlane().