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

Triangle class. More...

#include <triangle.h>

Collaboration diagram for OTriangle:
Collaboration graph
[legend]

Public Member Functions

 OTriangle (int p1, int p2, int p3)
 Constructor b. More...
 
 OTriangle (OPoint3D A, OPoint3D B, OPoint3D C)
 Constructor by 3 OPoint3D. More...
 
 ~OTriangle ()
 Destructor. More...
 
double getSurface ()
 Compute the triangle surface. More...
 
OPoint3D getCentre ()
 Gives back the triangle center. More...
 
OPoint3Dvertex (unsigned i)
 Get the OPoint3D from the specific index. More...
 
const OPoint3Dvertex (unsigned i) const
 Get coordinate (int) from index. More...
 
int & index (unsigned i)
 
int index (unsigned i) const
 Get coordinate (int) from index. More...
 
bool checkConsistencyWrtPointsTab (const std::deque< OPoint3D > &points) const
 Check the consistency between indexes of points and the points of this OTriangle. More...
 
std::string reportInconsistencyWrtPointsTab (const std::deque< OPoint3D > &points)
 If inconsistency found between indexes and OPoint3D points, prints it. More...
 
bool operator== (const OTriangle &other) const
 

Public Attributes

int _p1
 Index of the first OPoint3D _A. More...
 
int _p2
 Index of the second OPoint3D _B. More...
 
int _p3
 Index of the third OPoint3D _C. More...
 
OPoint3D _A
 First OPoint3D. More...
 
OPoint3D _B
 Second OPoint3D. More...
 
OPoint3D _C
 Third OPoint3D. More...
 

Static Private Attributes

static OPoint3D OTriangle::* vertices_m_ptr [3] = {&OTriangle::_A, &OTriangle::_B, &OTriangle::_C}
 < A static table of OPoint3D. More...
 
static int OTriangle::* indices_m_ptr [3] = {&OTriangle::_p1, &OTriangle::_p2, &OTriangle::_p3}
 

Detailed Description

Triangle class.

Definition at line 27 of file triangle.h.

Constructor & Destructor Documentation

◆ OTriangle() [1/2]

OTriangle::OTriangle ( int  p1,
int  p2,
int  p3 
)

Constructor b.

Definition at line 50 of file triangle.cpp.

◆ OTriangle() [2/2]

OTriangle::OTriangle ( OPoint3D  A,
OPoint3D  B,
OPoint3D  C 
)

Constructor by 3 OPoint3D.

Definition at line 63 of file triangle.cpp.

◆ ~OTriangle()

OTriangle::~OTriangle ( )

Destructor.

Definition at line 85 of file triangle.cpp.

Member Function Documentation

◆ checkConsistencyWrtPointsTab()

bool OTriangle::checkConsistencyWrtPointsTab ( const std::deque< OPoint3D > &  points) const

Check the consistency between indexes of points and the points of this OTriangle.

Definition at line 122 of file triangle.cpp.

Here is the caller graph for this function:

◆ getCentre()

OPoint3D OTriangle::getCentre ( )

Gives back the triangle center.

Definition at line 113 of file triangle.cpp.

◆ getSurface()

OTriangle::getSurface ( )

Compute the triangle surface.

Definition at line 87 of file triangle.cpp.

Here is the call graph for this function:

◆ index() [1/2]

int & OTriangle::index ( unsigned  i)

Definition at line 44 of file triangle.cpp.

Here is the caller graph for this function:

◆ index() [2/2]

int OTriangle::index ( unsigned  i) const

Get coordinate (int) from index.

Definition at line 38 of file triangle.cpp.

◆ operator==()

bool OTriangle::operator== ( const OTriangle other) const

Definition at line 73 of file triangle.cpp.

Here is the call graph for this function:

◆ reportInconsistencyWrtPointsTab()

std::string OTriangle::reportInconsistencyWrtPointsTab ( const std::deque< OPoint3D > &  points)

If inconsistency found between indexes and OPoint3D points, prints it.

Definition at line 128 of file triangle.cpp.

Here is the call graph for this function:

◆ vertex() [1/2]

OPoint3D & OTriangle::vertex ( unsigned  i)

Get the OPoint3D from the specific index.

Definition at line 26 of file triangle.cpp.

Here is the caller graph for this function:

◆ vertex() [2/2]

const OPoint3D & OTriangle::vertex ( unsigned  i) const

Get coordinate (int) from index.

Definition at line 32 of file triangle.cpp.

Member Data Documentation

◆ _A

OPoint3D OTriangle::_A

First OPoint3D.

Definition at line 53 of file triangle.h.

◆ _B

OPoint3D OTriangle::_B

Second OPoint3D.

Definition at line 54 of file triangle.h.

◆ _C

OPoint3D OTriangle::_C

Third OPoint3D.

Get the OPoint3D from the specific index.

Definition at line 55 of file triangle.h.

◆ _p1

int OTriangle::_p1

Index of the first OPoint3D _A.

Definition at line 49 of file triangle.h.

◆ _p2

int OTriangle::_p2

Index of the second OPoint3D _B.

Definition at line 50 of file triangle.h.

◆ _p3

int OTriangle::_p3

Index of the third OPoint3D _C.

Definition at line 51 of file triangle.h.

◆ indices_m_ptr

int OTriangle::* OTriangle::indices_m_ptr = {&OTriangle::_p1, &OTriangle::_p2, &OTriangle::_p3}
staticprivate

Definition at line 78 of file triangle.h.

◆ vertices_m_ptr

OPoint3D OTriangle::* OTriangle::vertices_m_ptr = {&OTriangle::_A, &OTriangle::_B, &OTriangle::_C}
staticprivate

< A static table of OPoint3D.

A static table of coordinate.

Definition at line 76 of file triangle.h.


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