Code_TYMPAN
4.2.0
Industrial site acoustic simulation
|
Assigne une altitude a chaque point de l'espace. More...
#include <TYAltimetrie.h>
Classes | |
struct | grid_index |
Integer coordinates into the grid. More... | |
Public Member Functions | |
TYAltimetrie () | |
TYAltimetrie (const TYAltimetrie &other) | |
virtual | ~TYAltimetrie () |
TYAltimetrie & | operator= (const TYAltimetrie &other) |
Operateur =. More... | |
bool | operator== (const TYAltimetrie &other) const |
Operateur ==. More... | |
bool | operator!= (const TYAltimetrie &other) const |
Operateur !=. More... | |
virtual bool | deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false) |
virtual std::string | toString () const |
virtual DOM_Element | toXML (DOM_Element &domElement) |
virtual int | fromXML (DOM_Element domElement) |
void | plugBackTriangulation (const std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const std::deque< LPTYSol > &materials) |
plug back triangulation providfed by the TYTopographie More... | |
TYTabLPPolygon & | getListFaces () |
const TYTabLPPolygon & | getListFaces () const |
void | setListFaces (const TYTabLPPolygon &list) |
bool | addFace (LPTYPolygon pFace) |
bool | remFace (const LPTYPolygon pFace) |
bool | remFace (QString idFace) |
LPTYPolygon | getFace (int index) |
const TYPolygon * | getFace (int index) const |
double | altitude (const OPoint3D &pt) |
bool | updateAltitude (OPoint3D &pt) const |
Modifie l'altitude d'un point donn�. Si le point est hors de la zone dans laquelle l'altim�trie est d�finie, la valeur z du point est mise a TYAltimetry::invalid_altitude . More... | |
OPoint3D | projection (const OPoint3D &pt) const |
Calcule les coordonnees de la projection au sol d'un point de l'espace. More... | |
double | HauteurMoyenne (TYTabPoint &pts) |
double | PremiereHauteurPositiveOuNulle (TYTabPoint &ptsIn) |
LPTYPolygon | getFaceUnder (OPoint3D pt) |
Return the face under a point. More... | |
unsigned int | getFacesInBox (const OBox2 &box, TYTabLPPolygon &tabPolygon) |
find a list of triangle partialy or totaly included in a box More... | |
unsigned int | getPointsInBox (const OPoint3D &pt0, const OPoint3D &pt1, const OPoint3D &pt2, const OPoint3D &pt3, TYTabPoint &tabPolygon) |
find a list of point included in a box defined by four points More... | |
void | exportMesh (std::deque< OPoint3D > &vertices, std::deque< OTriangle > &faces, std::deque< LPTYSol > &materials) |
bool | containsData () |
Public Member Functions inherited from TYElement | |
void * | getAllUses () |
void | setAllUses (void *allUses) |
void | cleanAllUses () |
TYElement () | |
TYElement (TYElement *pParent, bool PutInInstanceList=true) | |
TYElement (const TYElement &other, bool PutInInstanceList=true) | |
virtual | ~TYElement () |
void | setID (TYUUID id) |
void | setID (const QString &str_id) |
const TYUUID & | getID () const |
QString | getStringID () const |
bool | hasNullID () const |
void | regenerateID () |
void | setName (QString name) |
void | setName (std::string name) |
virtual QString | getName () const |
void | setParent (TYElement *pParent) |
TYElement * | getParent () const |
virtual void | setIsAcousticModified (bool isModified) |
bool | getIsAcousticModified () |
virtual void | setIsGeometryModified (bool isModified) |
bool | getIsGeometryModified () |
TYElement & | operator= (const TYElement &other) |
bool | operator== (const TYElement &other) const |
bool | operator!= (const TYElement &other) const |
bool | callFromXMLIfEqual (DOM_Element &domElement, int *pRetVal=NULL) |
std::string | getMetierName () |
virtual void | updateCurrentCalcul (TYListID &listID, bool recursif=true) |
virtual void | getChilds (LPTYElementArray &childs, bool recursif=true) |
virtual void | setInCurrentCalcul (bool state, bool recurschild=true, bool recursparent=true) |
virtual bool | isInCurrentCalcul () |
void | addCopy () |
Increment le compteur de nombre de copies. More... | |
void | setCopyCount (const unsigned int copyCount) |
Modifie la vaeur du compteur. More... | |
Public Member Functions inherited from IRefCount | |
IRefCount () | |
virtual | ~IRefCount () |
virtual int | incRef () |
virtual int | decRef () |
int | getRefCount () const |
Public Member Functions inherited from OPrototype | |
virtual | ~OPrototype () |
virtual OPrototype * | clone () const =0 |
virtual const char * | getClassName () const |
bool | isA (const char *className) const |
Static Public Attributes | |
static const double | invalid_altitude = -1E5 |
Protected Member Functions | |
FRIEND_TEST (TYAltimetryTest, dummy_grid) | |
FRIEND_TEST (TYAltimetryTest, simple_grid) | |
FRIEND_TEST (TYAltimetryTest, simple_terrain) | |
bool | getGridIndices (const OPoint3D &pt, grid_index &indXY) const |
Select indices of faces to test. More... | |
bool | getGridIndices (const OPoint3D *pts, unsigned int *iMinMax) const |
Select indices of faces to test. More... | |
bool | getGridIndices (const OBox2 &box, unsigned int *iMinMax) const |
Select indices of faces to test. More... | |
void | getFacesinIndices (unsigned int &minX, unsigned int &maxX, unsigned int &minY, unsigned int &maxY, TYTabLPPolygon &faces) |
Select faces in the interval minX, maxX, minY, maxY. More... | |
void | initNullGrid () |
Initilise the grid related attributes for a null grid. More... | |
void | clearAcceleratingGrid () |
clean the accelerating structure More... | |
void | initAcceleratingGrid (unsigned to_be_reserved=0) |
initialise the accelerating structure given current _bbox and _gridS{XY} More... | |
void | copyAcceleratingGrid (const TYAltimetrie &other) |
Clear the grid and reinitialise it as a copy of other . More... | |
Protected Member Functions inherited from OPrototype | |
OPrototype () | |
Protected Attributes | |
TYTabLPPolygon | _listFaces |
Liste des polygones correspondant aux faces de cet altimetrie. More... | |
OBox | _bbox |
Bounding Box 2D de l'altimetrie. More... | |
TYTabLPPolygon ** | _pSortedFaces |
unsigned | _gridSX |
Size along each dimension of the accelerating grid. More... | |
unsigned | _gridSY |
double | _gridDX |
Step along each dimension of the accelerating grid. More... | |
double | _gridDY |
std::deque< OPoint3D > | _vertices |
std::deque< OTriangle > | _faces |
std::deque< LPTYSol > | _materials |
Protected Attributes inherited from TYElement | |
QString | _name |
Nom courant de l'element. More... | |
TYElement * | _pParent |
Reference sur l'element parent. More... | |
bool | _bPutInInstanceList |
unsigned int | _copyCount |
bool | _inCurrentCalcul |
Indique si cet element est actif dans le Calcul courant. More... | |
bool | _isAcousticModified |
Indicateur de modification acoustique. More... | |
bool | _isGeometryModified |
Indicateur de modification de la geometrie. More... | |
LPTYElementGraphic | _pGraphicObject |
L'object graphique metier associe a cet element. More... | |
void * | _allUses |
Multi purpose void pointer (use for compatibility actually) More... | |
Protected Attributes inherited from IRefCount | |
int | m_refCount |
The reference counter. More... | |
Private Member Functions | |
bool | IsInsideFace (const TYTabPoint &pts, OPoint3D &pt) const |
Additional Inherited Members | |
Static Public Member Functions inherited from TYElement | |
static LPTYElementArray | findTypeCollectionAndCallFromXML (DOM_Element parentElem, const char *type) |
static void | setLogInstances (bool log) |
static bool | getLogInstances () |
static TYElement * | getInstance (TYUUID uuid) |
static void | purgeInstances () |
static bool | testId (const TYUUID &id, const TYElement *pElem) |
static TYUUID | newID () |
static TYUUID | fromString (QString id) |
static QString | toString (TYUUID &uuid) |
static uint64 | getConstructorCount () |
static uint64 | getDestructorCount () |
static uint64 | getIdGenerationCount () |
static bool | getIsSavedOk () |
static void | setIsSavedOk (const bool &toSave) |
static void | setRegenerateID (const bool &bRegenerate) |
static bool | getRegenerateID () |
Static Public Member Functions inherited from OPrototype | |
static OPrototype * | findAndClone (const char *className) |
static int | findPrototype (const char *className) |
static OPrototype * | safeDownCast (OPrototype *pObject) |
static void | add_factory (const char *, IOProtoFactory::ptr_type factory) |
Assigne une altitude a chaque point de l'espace.
Definition at line 34 of file TYAltimetrie.h.
TYAltimetrie::TYAltimetrie | ( | ) |
Constructeur.
Definition at line 53 of file TYAltimetrie.cpp.
TYAltimetrie::TYAltimetrie | ( | const TYAltimetrie & | other | ) |
Constructeur par copie.
Definition at line 59 of file TYAltimetrie.cpp.
|
virtual |
Destructeur.
Definition at line 65 of file TYAltimetrie.cpp.
bool TYAltimetrie::addFace | ( | LPTYPolygon | pFace | ) |
Ajoute une face a la liste des faces.
Definition at line 281 of file TYAltimetrie.cpp.
double TYAltimetrie::altitude | ( | const OPoint3D & | pt | ) |
Calcule l'altitude d'un point de l'espace. La coordonee Z du point est mise a jour si le point est situe dans la zone de definition de l'altimetrie.
false
si l'altitude du point n'a pu etre determinee; false
sinon. Definition at line 643 of file TYAltimetrie.cpp.
|
protected |
clean the accelerating structure
Definition at line 708 of file TYAltimetrie.cpp.
|
inline |
Definition at line 206 of file TYAltimetrie.h.
|
protected |
Clear the grid and reinitialise it as a copy of other
.
Definition at line 743 of file TYAltimetrie.cpp.
|
virtual |
Effectue une copie en allouant de la memoire (deep copy) et non pas en copiant seulement les pointeurs (shallow copy). Cette methode s'utilise comme l'operateur egal. L'ID peut ne pas etre copie, le parent n'est jamais copie.
pOther | L'element a copier. |
copyId | Copie l'identifiant unique ou pas. |
true
si la copie est possible; false
sinon. Reimplemented from TYElement.
Definition at line 98 of file TYAltimetrie.cpp.
|
protected |
|
protected |
|
protected |
|
virtual |
Extrait les informations a partir du noeud DOM passe afin de recuperer les parametres de la classe.
domElement | Le noeud DOM a partir duquel les parametres doivent etre recuperes. |
Reimplemented from TYElement.
Definition at line 145 of file TYAltimetrie.cpp.
|
inline |
Retourne une face de la liste des faces.
Definition at line 142 of file TYAltimetrie.h.
|
inline |
unsigned int TYAltimetrie::getFacesInBox | ( | const OBox2 & | box, |
TYTabLPPolygon & | tabPolygon | ||
) |
find a list of triangle partialy or totaly included in a box
A return value equal 0 means all triangle near the boxes are included
Definition at line 401 of file TYAltimetrie.cpp.
|
protected |
Select faces in the interval minX, maxX, minY, maxY.
Definition at line 562 of file TYAltimetrie.cpp.
LPTYPolygon TYAltimetrie::getFaceUnder | ( | OPoint3D | pt | ) |
Return the face under a point.
Definition at line 370 of file TYAltimetrie.cpp.
|
protected |
Select indices of faces to test.
Definition at line 476 of file TYAltimetrie.cpp.
|
protected |
Select indices of faces to test.
Definition at line 520 of file TYAltimetrie.cpp.
|
protected |
Select indices of faces to test.
Definition at line 549 of file TYAltimetrie.cpp.
|
inline |
Set/Get de la liste des faces.
Definition at line 112 of file TYAltimetrie.h.
|
inline |
Set/Get de la liste des faces.
Definition at line 117 of file TYAltimetrie.h.
unsigned int TYAltimetrie::getPointsInBox | ( | const OPoint3D & | pt0, |
const OPoint3D & | pt1, | ||
const OPoint3D & | pt2, | ||
const OPoint3D & | pt3, | ||
TYTabPoint & | tabPolygon | ||
) |
find a list of point included in a box defined by four points
Value returned is the number of point
Definition at line 440 of file TYAltimetrie.cpp.
double TYAltimetrie::HauteurMoyenne | ( | TYTabPoint & | pts | ) |
Retourne la hauteur moyenne des points passes en arguments.
Definition at line 648 of file TYAltimetrie.cpp.
|
protected |
initialise the accelerating structure given current _bbox and _gridS{XY}
Definition at line 726 of file TYAltimetrie.cpp.
|
protected |
Initilise the grid related attributes for a null grid.
Definition at line 698 of file TYAltimetrie.cpp.
|
inlineprivate |
bool TYAltimetrie::operator!= | ( | const TYAltimetrie & | other | ) | const |
Operateur !=.
Definition at line 93 of file TYAltimetrie.cpp.
TYAltimetrie & TYAltimetrie::operator= | ( | const TYAltimetrie & | other | ) |
Operateur =.
Definition at line 71 of file TYAltimetrie.cpp.
bool TYAltimetrie::operator== | ( | const TYAltimetrie & | other | ) | const |
Operateur ==.
Definition at line 83 of file TYAltimetrie.cpp.
void TYAltimetrie::plugBackTriangulation | ( | const std::deque< OPoint3D > & | points, |
std::deque< OTriangle > & | triangles, | ||
const std::deque< LPTYSol > & | materials | ||
) |
plug back triangulation providfed by the TYTopographie
Calcul l'altimetrie a partir d'une collection de points. L'altimetrie est le resultat de la triangulation de Delaunay calculee a partir des points passes.
points | Les points pour calculer l'altimetrie. Calcul l'altimetrie a partir d'une collection de points et de segments. L'altimetrie est le resultat de la triangulation de Delaunay contrainte calculee a partir des points passes et des segments. This function expect to be passed the deques of points and triangles computed by TYTopographie::computeAltimetricTriangulation, which itself calls the new tympan::AltimetryBuilder. |
points | the vertices of the triangulation |
triangles | the faces of the triangulation |
Definition at line 167 of file TYAltimetrie.cpp.
double TYAltimetrie::PremiereHauteurPositiveOuNulle | ( | TYTabPoint & | ptsIn | ) |
Retourne la premiere (ordre de parsing du tableau passes en arguments) hauteur positive ou nulle des points ptsIn.
Definition at line 672 of file TYAltimetrie.cpp.
Calcule les coordonnees de la projection au sol d'un point de l'espace.
Definition at line 588 of file TYAltimetrie.cpp.
bool TYAltimetrie::remFace | ( | const LPTYPolygon | pFace | ) |
Supprime une face a la liste des faces.
Definition at line 293 of file TYAltimetrie.cpp.
bool TYAltimetrie::remFace | ( | QString | idFace | ) |
Supprime une face a la liste des faces a partir de son ID.
Definition at line 314 of file TYAltimetrie.cpp.
|
inline |
Set/Get de la liste des faces.
Definition at line 122 of file TYAltimetrie.h.
|
virtual |
Retourne une chaine de caractere donnant des informations sur cet objet (utile pour le debugage).
Reimplemented from TYElement.
Definition at line 133 of file TYAltimetrie.cpp.
|
virtual |
Construit une arborescence DOM a partir du noeud passe afin de sauvegarder les parametres au format XML.
domElement | Le noeud DOM parent a partir duquel l'arborescence doit etre creee. |
Reimplemented from TYElement.
Definition at line 138 of file TYAltimetrie.cpp.
bool TYAltimetrie::updateAltitude | ( | OPoint3D & | pt | ) | const |
Modifie l'altitude d'un point donn�. Si le point est hors de la zone dans laquelle l'altim�trie est d�finie, la valeur z du point est mise a TYAltimetry::invalid_altitude
.
Definition at line 630 of file TYAltimetrie.cpp.
|
protected |
Bounding Box 2D de l'altimetrie.
Definition at line 246 of file TYAltimetrie.h.
|
protected |
Definition at line 276 of file TYAltimetrie.h.
|
protected |
Step along each dimension of the accelerating grid.
Definition at line 271 of file TYAltimetrie.h.
|
protected |
Definition at line 272 of file TYAltimetrie.h.
|
protected |
Size along each dimension of the accelerating grid.
Definition at line 267 of file TYAltimetrie.h.
|
protected |
Definition at line 268 of file TYAltimetrie.h.
|
protected |
Liste des polygones correspondant aux faces de cet altimetrie.
Definition at line 243 of file TYAltimetrie.h.
|
protected |
Definition at line 277 of file TYAltimetrie.h.
|
protected |
Definition at line 264 of file TYAltimetrie.h.
|
protected |
Definition at line 275 of file TYAltimetrie.h.
|
static |
Definition at line 42 of file TYAltimetrie.h.