|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Plan defined by its equation : ax+by+cz+d=0. More...
#include <plan.h>

Public Member Functions | |
| OPlan () | |
| Default constructor With a=b=c=d=0. More... | |
| OPlan (const OPlan &plan) | |
| Copy constructor. More... | |
| OPlan (double a, double b, double c, double d) | |
| Constructor with the a, b, c and d parameters. More... | |
| OPlan (const OPoint3D &pt1, const OPoint3D &pt2, const OPoint3D &pt3) | |
| Constructs a new plan from 3 points. More... | |
| OPlan (const OPoint3D &pt, const OVector3D &normale) | |
| Constructs a new plan from 1 point and a normal. More... | |
| virtual | ~OPlan () |
| Destructor. More... | |
| OPlan & | operator= (const OPlan &plan) |
| Assignment operator. More... | |
| bool | operator== (const OPlan &plan) const |
| The equality operator. More... | |
| bool | operator!= (const OPlan &plan) const |
| The inequality operator. More... | |
| void | set (double a, double b, double c, double d) |
| Sets a, b, c and d parameters directly. More... | |
| void | set (const OPoint3D &pt1, const OPoint3D &pt2, const OPoint3D &pt3) |
| Sets with 3 points. More... | |
| void | set (const OPoint3D &pt, const OVector3D &normale) |
| Sets with 1 point and a normal. More... | |
| int | intersectsSegment (const OPoint3D &pt1, const OPoint3D &pt2, OPoint3D &ptIntersec) const |
| Calculate the intersection of this plane with a segment defined by two points. More... | |
| int | intersectsDroite (const OPoint3D &pt, const OVector3D &vector, OPoint3D &ptIntersec) |
| Calculate the intersection of this plane with a line defined by a point and a vector. More... | |
| int | intersectsPlan (const OPlan &plan, OVector3D &vectorIntersec) |
| Calculate the intersection of this plane with another plane. More... | |
| int | intersectsSurface (const TabPoint3D &contour, OSegment3D &segment) const |
| Compute intersection between a plan and a surface defined by his bounds. More... | |
| bool | isInPlan (const OPoint3D &pt) |
| Check if a point belongs to a plane. More... | |
| bool | is_valid () |
| Check whether the plane is valid. More... | |
| bool | is_null () |
| bool | is_NaN () |
| double | angle (const OPlan &plan) |
| Calculation of the angle between this plane and another plane. More... | |
| double | distance (const OPoint3D &pt) |
| Calculation of the minimal distance between a point and this plane. More... | |
| OPoint3D | symPtPlan (const OPoint3D &pt) |
| Calculate the symmetrical of a point relative to the plane. More... | |
| OPoint3D | projPtPlan (const OPoint3D &pt) |
| Calculate the projection of a point on the plane. More... | |
| bool | distancePlanParallel (const OPlan &plan, double &distance) |
| Calculate the distance between this plan and another parallel plane. More... | |
| bool | isParallel (const OPlan &plan) |
| Check if this plane is parallel with another plane. More... | |
| bool | isOrthogonal (const OPlan &plan) |
| Check if this plan is perpendicular to another plan. More... | |
Public Attributes | |
| double | _a |
| The a parameter in the equation ax+by+cz+d=0. More... | |
| double | _b |
| The b parameter in the equation ax+by+cz+d=0. More... | |
| double | _c |
| The c parameter in the equation ax+by+cz+d=0. More... | |
| double | _d |
| The d parameter in the equation ax+by+cz+d=0. More... | |
| ORepere3D | rframe |
Protected Member Functions | |
| void | update_explicit_repr (OVector3D hint=OVector3D(1, 1, 1)) |
| updates the implicit representation of the plane More... | |
| OPlan::OPlan | ( | const OPlan & | plan | ) |
| OPlan::OPlan | ( | double | a, |
| double | b, | ||
| double | c, | ||
| double | d | ||
| ) |
Constructor with the a, b, c and d parameters.
| a | The a parameter in the equation ax+by+cz+d=0. |
| b | The b parameter in the equation ax+by+cz+d=0. |
| c | The c parameter in the equation ax+by+cz+d=0. |
| d | The d parameter in the equation ax+by+cz+d=0. |
Definition at line 36 of file plan.cpp.

Constructs a new plan from 3 points.
| pt1 | Point 1. |
| pt2 | Point 2. |
| pt3 | Point 3. |
Definition at line 41 of file plan.cpp.

Constructs a new plan from 1 point and a normal.
All plan vectors are normal to N ! => Scalar product P1P.N = 0 Nx*(Px-P1x) + Ny*(Py-P1y) + Nz*(Pz-P1z) = 0 Can be written as : a*Px + b*Py + c*Pz + d = 0 == Equation du plan
| pt | The point. |
| normale | The normal. |
Definition at line 46 of file plan.cpp.

| double OPlan::angle | ( | const OPlan & | plan | ) |
| double OPlan::distance | ( | const OPoint3D & | pt | ) |
| bool OPlan::distancePlanParallel | ( | const OPlan & | plan, |
| double & | distance | ||
| ) |
Calculate the distance between this plan and another parallel plane.
| plan | Another plane. |
| distance | The distance between 2 planes if they are parallel. |
true if the two planes are parallel; false if not. Definition at line 410 of file plan.cpp.


| int OPlan::intersectsDroite | ( | const OPoint3D & | pt, |
| const OVector3D & | vector, | ||
| OPoint3D & | ptIntersec | ||
| ) |
Calculate the intersection of this plane with a line defined by a point and a vector.
| pt | A point belonging to the line. |
| vector | A vector defining the line. |
| ptIntersec | The intersection point. |
Definition at line 251 of file plan.cpp.

Calculate the intersection of this plane with another plane.
| plan | An another plane. |
| vectorIntersec | The vector defining the intersection. |
Definition at line 275 of file plan.cpp.

| int OPlan::intersectsSegment | ( | const OPoint3D & | pt1, |
| const OPoint3D & | pt2, | ||
| OPoint3D & | ptIntersec | ||
| ) | const |
Calculate the intersection of this plane with a segment defined by two points.
Note : In case the segment belongs to the plane, the result is INTERS_CONFONDU, and the coordinates of the intersection are not updated.
Algorithm :
| pt1 | The segment first point. |
| pt2 | The segment second point. |
| ptIntersec | The intersection point. |
Definition at line 141 of file plan.cpp.


| int OPlan::intersectsSurface | ( | const TabPoint3D & | contour, |
| OSegment3D & | segment | ||
| ) | const |
| bool OPlan::is_NaN | ( | ) |
| bool OPlan::is_null | ( | ) |
| bool OPlan::is_valid | ( | ) |
Check whether the plane is valid.
a OPlan object can be invalid, i.e. not actually represent a plane, in case two cases :
_a, _b, _c) is null. This is the case when a OPlan is default constructed.Definition at line 133 of file plan.cpp.

| bool OPlan::isInPlan | ( | const OPoint3D & | pt | ) |
| bool OPlan::isOrthogonal | ( | const OPlan & | plan | ) |
| bool OPlan::isParallel | ( | const OPlan & | plan | ) |
| bool OPlan::operator!= | ( | const OPlan & | plan | ) | const |
| bool OPlan::operator== | ( | const OPlan & | plan | ) | const |
Sets with 1 point and a normal.
| pt | The point. |
| normale | The normal. |
Definition at line 113 of file plan.cpp.

Sets with 3 points.
| pt1 | Point 1. |
| pt2 | Point 2. |
| pt3 | Point 3. |
Definition at line 103 of file plan.cpp.

| void OPlan::set | ( | double | a, |
| double | b, | ||
| double | c, | ||
| double | d | ||
| ) |
Sets a, b, c and d parameters directly.
| a | The a parameter in the equation ax+by+cz+d=0. |
| b | The b parameter in the equation ax+by+cz+d=0. |
| c | The c parameter in the equation ax+by+cz+d=0. |
| d | The d parameter in the equation ax+by+cz+d=0. |
Definition at line 94 of file plan.cpp.


updates the implicit representation of the plane
We derive a reference frame for the plane (vector u and v) from the implicit equation which is the primary representation of the plane.
Definition at line 446 of file plan.cpp.


| double OPlan::_a |
| double OPlan::_b |
| double OPlan::_c |
| double OPlan::_d |