Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSegment.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 /*
17  *
18  */
19 
20 #ifndef __TY_SEGMENT__
21 #define __TY_SEGMENT__
22 
26 #include "TYPoint.h"
27 
28 // TYRectangle.h est inclu a la fin de la declaration de TYSegment.
29 class TYRectangle;
30 
34 class TYSegment : public TYElement, public OSegment3D, public TYColorInterface
35 {
39 
40  // Methodes
41 public:
45  TYSegment();
49  TYSegment(const TYSegment& other);
53  TYSegment(TYPoint ptA, TYPoint ptB);
57  virtual ~TYSegment();
58 
60  virtual TYSegment& operator=(const TYSegment& other);
62  virtual bool operator==(const TYSegment& other) const;
64  virtual bool operator!=(const TYSegment& other) const;
65 
74  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
75 
76  virtual std::string toString() const;
77 
78  virtual DOM_Element toXML(DOM_Element& domElement);
79  virtual int fromXML(DOM_Element domElement);
80 
88  static bool unorderedIsEqual(const TYSegment& s1, const TYSegment& s2);
89 };
90 
91 #include "TYRectangle.h"
92 
93 #endif // __TY_SEGMENT__
All base classes related to 3D manipulation.
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:430
#define OPROTODECL(classname)
Definition: TYElement.h:64
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:385
Class to define a segment.
Definition: 3d.h:1141
virtual bool operator==(const TYSegment &other) const
Operateur ==.
Definition: TYSegment.cpp:68
virtual ~TYSegment()
Definition: TYSegment.cpp:54
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYSegment.cpp:97
virtual int fromXML(DOM_Element domElement)
Definition: TYSegment.cpp:134
virtual bool operator!=(const TYSegment &other) const
Operateur !=.
Definition: TYSegment.cpp:92
static bool unorderedIsEqual(const TYSegment &s1, const TYSegment &s2)
Comparison function for unordered segment.
Definition: TYSegment.cpp:167
virtual TYSegment & operator=(const TYSegment &other)
Operateur =.
Definition: TYSegment.cpp:56
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYSegment.cpp:120
virtual std::string toString() const
Definition: TYSegment.cpp:114