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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _MAT_Arc_HeaderFile
18 #define _MAT_Arc_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Address.hxx>
25 #include <Standard_Transient.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <MAT_Side.hxx>
33 DEFINE_STANDARD_HANDLE(MAT_Arc, Standard_Transient)
35 //! An Arc is associated to each Bisecting of the mat.
36 class MAT_Arc : public Standard_Transient
42 Standard_EXPORT MAT_Arc(const Standard_Integer ArcIndex, const Standard_Integer GeomIndex, const Handle(MAT_BasicElt)& FirstElement, const Handle(MAT_BasicElt)& SecondElement);
44 //! Returns the index of <me> in Graph.theArcs.
45 Standard_EXPORT Standard_Integer Index() const;
47 //! Returns the index associated of the geometric
48 //! representation of <me>.
49 Standard_EXPORT Standard_Integer GeomIndex() const;
51 //! Returns one of the BasicElt equidistant from <me>.
52 Standard_EXPORT Handle(MAT_BasicElt) FirstElement() const;
54 //! Returns the other BasicElt equidistant from <me>.
55 Standard_EXPORT Handle(MAT_BasicElt) SecondElement() const;
57 //! Returns one Node extremity of <me>.
58 Standard_EXPORT Handle(MAT_Node) FirstNode() const;
60 //! Returns the other Node extremity of <me>.
61 Standard_EXPORT Handle(MAT_Node) SecondNode() const;
63 //! an Arc has two Node, if <aNode> egal one
64 //! Returns the other.
66 //! if <aNode> is not oh <me>
67 Standard_EXPORT Handle(MAT_Node) TheOtherNode (const Handle(MAT_Node)& aNode) const;
69 //! Returnst True is there is an arc linked to
70 //! the Node <aNode> located on the side <aSide> of <me>;
71 //! if <aNode> is not on <me>
72 Standard_EXPORT Standard_Boolean HasNeighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
74 //! Returns the first arc linked to the Node <aNode>
75 //! located on the side <aSide> of <me>;
76 //! if HasNeighbour() returns FALSE.
77 Standard_EXPORT Handle(MAT_Arc) Neighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
79 Standard_EXPORT void SetIndex (const Standard_Integer anInteger);
81 Standard_EXPORT void SetGeomIndex (const Standard_Integer anInteger);
83 Standard_EXPORT void SetFirstElement (const Handle(MAT_BasicElt)& aBasicElt);
85 Standard_EXPORT void SetSecondElement (const Handle(MAT_BasicElt)& aBasicElt);
87 Standard_EXPORT void SetFirstNode (const Handle(MAT_Node)& aNode);
89 Standard_EXPORT void SetSecondNode (const Handle(MAT_Node)& aNode);
91 Standard_EXPORT void SetFirstArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
93 Standard_EXPORT void SetSecondArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
95 Standard_EXPORT void SetNeighbour (const MAT_Side aSide, const Handle(MAT_Node)& aNode, const Handle(MAT_Arc)& anArc);
100 DEFINE_STANDARD_RTTIEXT(MAT_Arc,Standard_Transient)
110 Standard_Integer arcIndex;
111 Standard_Integer geomIndex;
112 Handle(MAT_BasicElt) firstElement;
113 Handle(MAT_BasicElt) secondElement;
114 Handle(MAT_Node) firstNode;
115 Handle(MAT_Node) secondNode;
116 Standard_Address firstArcLeft;
117 Standard_Address firstArcRight;
118 Standard_Address secondArcRight;
119 Standard_Address secondArcLeft;
130 #endif // _MAT_Arc_HeaderFile