Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSegment.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
Class to define a segment.
Definition: 3d.h:1089
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