42cf5bc1 |
1 | // Created on: 1993-04-30 |
2 | // Created by: Yves FRICAUD |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _MAT_Arc_HeaderFile |
18 | #define _MAT_Arc_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <Standard_Address.hxx> |
25e59720 |
25 | #include <Standard_Transient.hxx> |
42cf5bc1 |
26 | #include <Standard_Boolean.hxx> |
27 | #include <MAT_Side.hxx> |
28 | class MAT_BasicElt; |
29 | class MAT_Node; |
30 | class Standard_DomainError; |
31 | |
32 | |
33 | class MAT_Arc; |
25e59720 |
34 | DEFINE_STANDARD_HANDLE(MAT_Arc, Standard_Transient) |
42cf5bc1 |
35 | |
36 | //! An Arc is associated to each Bisecting of the mat. |
25e59720 |
37 | class MAT_Arc : public Standard_Transient |
42cf5bc1 |
38 | { |
39 | |
40 | public: |
41 | |
42 | |
43 | Standard_EXPORT MAT_Arc(const Standard_Integer ArcIndex, const Standard_Integer GeomIndex, const Handle(MAT_BasicElt)& FirstElement, const Handle(MAT_BasicElt)& SecondElement); |
44 | |
45 | //! Returns the index of <me> in Graph.theArcs. |
46 | Standard_EXPORT Standard_Integer Index() const; |
47 | |
48 | //! Returns the index associated of the geometric |
49 | //! representation of <me>. |
50 | Standard_EXPORT Standard_Integer GeomIndex() const; |
51 | |
52 | //! Returns one of the BasicElt equidistant from <me>. |
53 | Standard_EXPORT Handle(MAT_BasicElt) FirstElement() const; |
54 | |
55 | //! Returns the other BasicElt equidistant from <me>. |
56 | Standard_EXPORT Handle(MAT_BasicElt) SecondElement() const; |
57 | |
58 | //! Returns one Node extremity of <me>. |
59 | Standard_EXPORT Handle(MAT_Node) FirstNode() const; |
60 | |
61 | //! Returns the other Node extremity of <me>. |
62 | Standard_EXPORT Handle(MAT_Node) SecondNode() const; |
63 | |
64 | //! an Arc has two Node, if <aNode> egal one |
65 | //! Returns the other. |
66 | //! |
67 | //! if <aNode> is not oh <me> |
68 | Standard_EXPORT Handle(MAT_Node) TheOtherNode (const Handle(MAT_Node)& aNode) const; |
69 | |
70 | //! Returnst True is there is an arc linked to |
71 | //! the Node <aNode> located on the side <aSide> of <me>; |
72 | //! if <aNode> is not on <me> |
73 | Standard_EXPORT Standard_Boolean HasNeighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const; |
74 | |
75 | //! Returns the first arc linked to the Node <aNode> |
76 | //! located on the side <aSide> of <me>; |
77 | //! if HasNeighbour() returns FALSE. |
78 | Standard_EXPORT Handle(MAT_Arc) Neighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const; |
79 | |
80 | Standard_EXPORT void SetIndex (const Standard_Integer anInteger); |
81 | |
82 | Standard_EXPORT void SetGeomIndex (const Standard_Integer anInteger); |
83 | |
84 | Standard_EXPORT void SetFirstElement (const Handle(MAT_BasicElt)& aBasicElt); |
85 | |
86 | Standard_EXPORT void SetSecondElement (const Handle(MAT_BasicElt)& aBasicElt); |
87 | |
88 | Standard_EXPORT void SetFirstNode (const Handle(MAT_Node)& aNode); |
89 | |
90 | Standard_EXPORT void SetSecondNode (const Handle(MAT_Node)& aNode); |
91 | |
92 | Standard_EXPORT void SetFirstArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc); |
93 | |
94 | Standard_EXPORT void SetSecondArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc); |
95 | |
96 | Standard_EXPORT void SetNeighbour (const MAT_Side aSide, const Handle(MAT_Node)& aNode, const Handle(MAT_Arc)& anArc); |
97 | |
98 | |
99 | |
100 | |
25e59720 |
101 | DEFINE_STANDARD_RTTIEXT(MAT_Arc,Standard_Transient) |
42cf5bc1 |
102 | |
103 | protected: |
104 | |
105 | |
106 | |
107 | |
108 | private: |
109 | |
110 | |
111 | Standard_Integer arcIndex; |
112 | Standard_Integer geomIndex; |
113 | Handle(MAT_BasicElt) firstElement; |
114 | Handle(MAT_BasicElt) secondElement; |
115 | Handle(MAT_Node) firstNode; |
116 | Handle(MAT_Node) secondNode; |
117 | Standard_Address firstArcLeft; |
118 | Standard_Address firstArcRight; |
119 | Standard_Address secondArcRight; |
120 | Standard_Address secondArcLeft; |
121 | |
122 | |
123 | }; |
124 | |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | #endif // _MAT_Arc_HeaderFile |