|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
The 3D Plane class using Hessian normal form. More...
#include <3d.h>

Public Member Functions | |
| OHPlane3D () | |
| Default constructor. More... | |
| OHPlane3D (const OHPlane3D &Plane) | |
| Copy constructor. More... | |
| OHPlane3D (const OVector3D &normal, const OPoint3D &origin) | |
| Constructs a new Plane. More... | |
| virtual | ~OHPlane3D () |
| Destructor. More... | |
| void | set (const OVector3D &normal, const OPoint3D &origin) |
| set a new Plane. More... | |
| OHPlane3D & | operator= (const OHPlane3D &Plane) |
| bool | operator== (const OHPlane3D &Plane) const |
| bool | operator!= (const OHPlane3D &Plane) const |
| int | intersects (const OPoint3D &pt1, const OPoint3D &pt2, OPoint3D &ptIntersec, double &t) const |
| Calculate the intersection with a segment defined by two points. More... | |
| int | intersects (const OSegment3D &seg, OPoint3D &ptIntersec) const |
| Calculate the intersection with a segment. More... | |
Private Attributes | |
| OVector3D | _N |
| OPoint3D | _O |
| double | _p |
The 3D Plane class using Hessian normal form.
the general equation of a plane is: a.x + b.y + c.z = d
by defining the components of the unit normal vector , N = (Nx, Ny, Nz) Nx = a / sqrt(a²+b²+c²) Ny = b / sqrt(a²+b²+c²) Nz = c / sqrt(a²+b²+c²)
and the constant: p = d / sqrt(a²+b²+c²)
Then the Hessian normal form of the plane is: N.X = -p
| OHPlane3D::OHPlane3D | ( | const OHPlane3D & | Plane | ) |
| int OHPlane3D::intersects | ( | const OPoint3D & | pt1, |
| const OPoint3D & | pt2, | ||
| OPoint3D & | ptIntersec, | ||
| double & | t | ||
| ) | const |
Calculate the intersection with a segment defined by two points.
For a detailed description of the algorithm used by this function refer to the following link:
Intersections of Lines, Segments and Planes (2D and 3D) http://geometryalgorithms.com/Archive/algorithm_0104/algorithm_0104B.htm
Note : In case the segment is overlaid on the line, the result is INTERS_CONFONDU, and the coordinates of the intersection point are not updated.
| pt1 | The segment first point. |
| pt2 | The segment second point. |
| ptIntersec | The intersection point. |
| t | The barycentre coefficient of the intersection point on segment (pt1, pt2). |
Definition at line 2167 of file 3d.cpp.


| int OHPlane3D::intersects | ( | const OSegment3D & | seg, |
| OPoint3D & | ptIntersec | ||
| ) | const |
Calculate the intersection with a segment.
Note : In case the segment is overlaid on the line, the result is INTERS_CONFONDU, and the coordinates of the intersection point are not updated.
| seg | The segment. |
| ptIntersec | The intersection point. |
Definition at line 2153 of file 3d.cpp.

| bool OHPlane3D::operator!= | ( | const OHPlane3D & | Plane | ) | const |
| bool OHPlane3D::operator== | ( | const OHPlane3D & | Plane | ) | const |