#include <points.H>
Inheritance diagram for mlib::Wplane:
Public Member Functions | |
Plane () | |
Default constructor. Creates a plane with a zero offset from the origin and default constructed vector. | |
Plane (const Wvec &n, double d) | |
Constructor that creates a plane with the normal and offset set to the values passed as arguments. | |
Plane (const Wpt &p, const Wvec &n) | |
Constructor that creates a plane that passes through the point p and that has normal n . | |
Plane (const Wpt &p1, const Wpt &p2, const Wpt &p3) | |
Constructor that creates a plane that contains the three points p1 , p2 and p3 . | |
Plane (const Wpt &, const Wvec &, const Wvec &) | |
Constructor that creates a plane that contains the given piont and two given vectors. | |
Plane (const Wptplg[], int n) | |
Create plane from a polygon of vertices (n >=3). | |
Plane (const Wptplg[], int n, const Wvec &normal) | |
The plane normal is given, just calculate the 'd' parameter from all polygon vertices. | |
Wvec & | normal () |
const Wvec & | normal () const |
double & | d () |
double | d () const |
Wpt | origin () const |
bool | is_valid () const |
Is the plane valid (i.e. does it have a unit length normal)? | |
bool | is_parallel (const Wplane &p) const |
Are the two planes parallel? | |
bool | is_equal (const Wplane &p) const |
Are the two planes equivalent? | |
Wplane | operator- () const |
Negates the plane's normal vector and offset. | |
Wpt | project (const Wpt &) const |
Projects the given point on to the plane. | |
Wvec | project (const Wvec &) const |
Projects the given vector on to the plane. | |
Wline | project (const Wline &) const |
Projects the given line on to the plane. | |
double | dist (const Wpt &p) const |
Computes the distance from the given point to the nearest point on the plane. | |
Wpt | intersect (const Wline &l) const |
Computes the intersection point of the given line and the plane. | |
Constructors | |
Wplane () | |
Wplane (CWvec &n, double d) | |
Wplane (CWpt &n, CWvec &v) | |
Wplane (CWpt &n, CWpt &p1, CWpt &p2) | |
Wplane (CWpt &p, CWvec &v1, CWvec &v2) | |
Wplane (CWpt plg[], int n) | |
Wplane (CWpt plg[], int n, CWvec &normal) | |
Protected Attributes | |
Wvec | _normal |
double | _d |
Definition at line 344 of file points.H.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 89 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d. |
|
Definition at line 88 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d. |
|
Computes the distance from the given point to the nearest point on the plane.
Definition at line 139 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal. |
|
Computes the intersection point of the given line and the plane.
Definition at line 142 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_normal, mlib::Plane< PLANE, P, V, L >::origin(), and mlib::Plane< PLANE, P, V, L >::plane_intersect(). |
|
Are the two planes equivalent?
Definition at line 112 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal. |
|
Are the two planes parallel?
Definition at line 108 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_normal. |
|
Is the plane valid (i.e. does it have a unit length normal)?
Definition at line 99 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_normal, and mlib::epsNorMath(). |
|
Definition at line 86 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_normal. |
|
Definition at line 85 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_normal. |
|
Negates the plane's normal vector and offset.
Definition at line 121 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal. |
|
Definition at line 96 of file plane.H. References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal. |
|
The plane normal is given, just calculate the 'd' parameter from all polygon vertices.
|
|
Create plane from a polygon of vertices (n >=3). All polygon vertices are used to calculate the plane coefficients to make the formula symetrical. |
|
Constructor that creates a plane that contains the given piont and two given vectors.
|
|
Constructor that creates a plane that contains the three points
Definition at line 66 of file plane.H. References mlib::cross(). |
|
Constructor that creates a plane that passes through the point
|
|
Constructor that creates a plane with the normal and offset set to the values passed as arguments.
|
|
Default constructor. Creates a plane with a zero offset from the origin and default constructed vector. This most likely creates an invalid plane with a zero length vector. |
|
Projects the given line on to the plane.
|
|
Projects the given vector on to the plane.
|
|
Projects the given point on to the plane.
|
|
|
|
|