Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Public Attributes | Protected Attributes | List of all members
TYBox Class Reference

#include <TYBox.h>

Inheritance diagram for TYBox:
Inheritance graph
[legend]
Collaboration diagram for TYBox:
Collaboration graph
[legend]

Public Member Functions

 TYBox ()
 
 TYBox (const TYBox &other)
 
virtual ~TYBox ()
 
TYBoxoperator= (const TYBox &other)
 Operateur =. More...
 
bool operator== (const TYBox &other) const
 Operateur ==. More...
 
bool operator!= (const TYBox &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)
 
int intersects (const OSegment3D &seg, TYTabPoint &ptList) const
 
int isInside (const TYPoint &pt) const
 
void setPosition (const TYPoint &position)
 
TYPointgetPosition ()
 
const TYPointgetPosition () const
 
- 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 TYUUIDgetID () 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)
 
TYElementgetParent () const
 
virtual void setIsAcousticModified (bool isModified)
 
bool getIsAcousticModified ()
 
virtual void setIsGeometryModified (bool isModified)
 
bool getIsGeometryModified ()
 
TYElementoperator= (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 OPrototypeclone () const =0
 
virtual const char * getClassName () const
 
bool isA (const char *className) const
 
- Public Member Functions inherited from TYColorInterface
virtual void updateColor ()
 
 TYColorInterface ()
 
 TYColorInterface (const TYColorInterface &other)
 
virtual ~TYColorInterface ()
 
TYColorInterfaceoperator= (const TYColorInterface &other)
 
bool operator== (const TYColorInterface &other) const
 
bool operator!= (const TYColorInterface &other) const
 
void deepCopy (const TYColorInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
 
DOM_Element toXML (DOM_Element &domElement)
 
int fromXML (DOM_Element domElement)
 
virtual void setColor (const OColor &color)
 
OColor getColor () const
 

Public Attributes

double _sizeX
 Dimension en X. More...
 
double _sizeY
 Dimension en Y. More...
 
double _sizeZ
 Dimension en Z. More...
 

Protected Attributes

TYPoint _position
 Position du centre de cette boite. More...
 
- 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...
 
- Protected Attributes inherited from TYColorInterface
OColor _color
 

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 TYElementgetInstance (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 OPrototypefindAndClone (const char *className)
 
static int findPrototype (const char *className)
 
static OPrototypesafeDownCast (OPrototype *pObject)
 
static void add_factory (const char *, IOProtoFactory::ptr_type factory)
 
- Protected Member Functions inherited from OPrototype
 OPrototype ()
 

Detailed Description

Classe de definition d'une boite. Une boite est representee par ses dimensions en X, Y et Z, ainsi que par un point pour indiquer sa position.

Definition at line 33 of file TYBox.h.

Constructor & Destructor Documentation

◆ TYBox() [1/2]

TYBox::TYBox ( )

Constructeur.

Definition at line 27 of file TYBox.cpp.

Here is the call graph for this function:

◆ TYBox() [2/2]

TYBox::TYBox ( const TYBox other)

Constructeur par copie.

Definition at line 37 of file TYBox.cpp.

◆ ~TYBox()

TYBox::~TYBox ( )
virtual

Destructeur.

Definition at line 42 of file TYBox.cpp.

Member Function Documentation

◆ deepCopy()

bool TYBox::deepCopy ( const TYElement pOther,
bool  copyId = true,
bool  pUseCopyTag = false 
)
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.

Parameters
pOtherL'element a copier.
copyIdCopie l'identifiant unique ou pas.
Returns
true si la copie est possible; false sinon.

Reimplemented from TYElement.

Definition at line 79 of file TYBox.cpp.

Here is the call graph for this function:

◆ fromXML()

int TYBox::fromXML ( DOM_Element  domElement)
virtual

Extrait les informations a partir du noeud DOM passe afin de recuperer les parametres de la classe.

Parameters
domElementLe noeud DOM a partir duquel les parametres doivent etre recuperes.
Returns
1 si la recuperation des parametres a reussie.

Reimplemented from TYElement.

Definition at line 116 of file TYBox.cpp.

Here is the call graph for this function:

◆ getPosition() [1/2]

TYPoint& TYBox::getPosition ( )
inline

Set/Get de la position du centre de cette boite.

Definition at line 97 of file TYBox.h.

Here is the caller graph for this function:

◆ getPosition() [2/2]

const TYPoint& TYBox::getPosition ( ) const
inline

Set/Get de la position du centre de cette boite.

Definition at line 101 of file TYBox.h.

◆ intersects()

int TYBox::intersects ( const OSegment3D seg,
TYTabPoint ptList 
) const

Calcule la liste des points d'intersection de cette boite avec le segment passe.

Parameters
segSegment dont on veut l'intersection.
ptListLes point resultant de l'intersection.
Returns
INTERS_OUI (1) si l'intersection existe, INTERS_CONFONDU (2) si les elements sont confondus, INTERS_NULLE (0) s'il n'y a pas d'intersection.

Definition at line 140 of file TYBox.cpp.

Here is the call graph for this function:

◆ isInside()

int TYBox::isInside ( const TYPoint pt) const

Test si le point passe se trouve a l'interieur de cette boite.

Parameters
ptPoint dont on teste l'appartenance a cette boite.
Returns
INTERS_OUI (1) si le point est a l'interieur de cette boite, INTERS_CONFONDU (2) si les elements sont confondus, INTERS_NULLE (0) si le point est a l'exterieur de cette boite.

Definition at line 208 of file TYBox.cpp.

Here is the caller graph for this function:

◆ operator!=()

bool TYBox::operator!= ( const TYBox other) const

Operateur !=.

Definition at line 74 of file TYBox.cpp.

Here is the call graph for this function:

◆ operator=()

TYBox & TYBox::operator= ( const TYBox other)

Operateur =.

Definition at line 46 of file TYBox.cpp.

Here is the call graph for this function:

◆ operator==()

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

Operateur ==.

Definition at line 60 of file TYBox.cpp.

Here is the caller graph for this function:

◆ setPosition()

void TYBox::setPosition ( const TYPoint position)
inline

Set/Get de la position du centre de cette boite.

Definition at line 93 of file TYBox.h.

Here is the caller graph for this function:

◆ toString()

std::string TYBox::toString ( ) const
virtual

Retourne une chaine de caractere donnant des informations sur cet objet (utile pour le debugage).

Returns
Une chaine de caractere informative sur cet objet.

Reimplemented from TYElement.

Definition at line 95 of file TYBox.cpp.

Here is the call graph for this function:

◆ toXML()

DOM_Element TYBox::toXML ( DOM_Element domElement)
virtual

Construit une arborescence DOM a partir du noeud passe afin de sauvegarder les parametres au format XML.

Parameters
domElementLe noeud DOM parent a partir duquel l'arborescence doit etre creee.
Returns
Le noeud DOM nouvellement cree.

Reimplemented from TYElement.

Definition at line 101 of file TYBox.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _position

TYPoint TYBox::_position
protected

Position du centre de cette boite.

Definition at line 115 of file TYBox.h.

◆ _sizeX

double TYBox::_sizeX

Dimension en X.

Definition at line 107 of file TYBox.h.

◆ _sizeY

double TYBox::_sizeY

Dimension en Y.

Definition at line 109 of file TYBox.h.

◆ _sizeZ

double TYBox::_sizeZ

Dimension en Z.

Definition at line 111 of file TYBox.h.


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