Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Private Attributes | List of all members
OHPlane3D Class Reference

The 3D Plane class using Hessian normal form. More...

#include <3d.h>

Collaboration diagram for OHPlane3D:
Collaboration graph
[legend]

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...
 
OHPlane3Doperator= (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
 

Detailed Description

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

Definition at line 1513 of file 3d.h.

Constructor & Destructor Documentation

◆ OHPlane3D() [1/3]

OHPlane3D::OHPlane3D ( )

Default constructor.

Definition at line 2107 of file 3d.cpp.

◆ OHPlane3D() [2/3]

OHPlane3D::OHPlane3D ( const OHPlane3D Plane)

Copy constructor.

Definition at line 2109 of file 3d.cpp.

◆ OHPlane3D() [3/3]

OHPlane3D::OHPlane3D ( const OVector3D normal,
const OPoint3D origin 
)

Constructs a new Plane.

Parameters
normalThe normal to the plane.
originA point of the plane

Definition at line 2116 of file 3d.cpp.

◆ ~OHPlane3D()

OHPlane3D::~OHPlane3D ( )
virtual

Destructor.

Definition at line 2123 of file 3d.cpp.

Member Function Documentation

◆ intersects() [1/2]

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.

Parameters
pt1The segment first point.
pt2The segment second point.
ptIntersecThe intersection point.
tThe barycentre coefficient of the intersection point on segment (pt1, pt2).
Returns
INTERS_OUI (1) if the intersection exists, INTERS_CONFONDU (2) if the two elements are overlaid, INTERS_NULLE (0) if there is no intersection.

Definition at line 2167 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intersects() [2/2]

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.

Parameters
segThe segment.
ptIntersecThe intersection point.
Returns
INTERS_OUI (1) if the intersection exists, INTERS_CONFONDU (2) if the elements are overlaid, INTERS_NULLE (0) if there is no intersection.

Definition at line 2153 of file 3d.cpp.

Here is the call graph for this function:

◆ operator!=()

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

Definition at line 2148 of file 3d.cpp.

Here is the call graph for this function:

◆ operator=()

OHPlane3D & OHPlane3D::operator= ( const OHPlane3D Plane)

Definition at line 2132 of file 3d.cpp.

◆ operator==()

bool OHPlane3D::operator== ( const OHPlane3D Plane) const

Definition at line 2140 of file 3d.cpp.

Here is the caller graph for this function:

◆ set()

void OHPlane3D::set ( const OVector3D normal,
const OPoint3D origin 
)

set a new Plane.

Parameters
normalThe normal to the plane.
originA point of the plane

Definition at line 2125 of file 3d.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _N

OVector3D OHPlane3D::_N
private

Definition at line 1580 of file 3d.h.

◆ _O

OPoint3D OHPlane3D::_O
private

Definition at line 1581 of file 3d.h.

◆ _p

double OHPlane3D::_p
private

Definition at line 1582 of file 3d.h.


The documentation for this class was generated from the following files: