Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:13

0001 // Created on: 1993-04-30
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _MAT_Arc_HeaderFile
0018 #define _MAT_Arc_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <MAT_Side.hxx>
0026 class MAT_BasicElt;
0027 class MAT_Node;
0028 
0029 
0030 class MAT_Arc;
0031 DEFINE_STANDARD_HANDLE(MAT_Arc, Standard_Transient)
0032 
0033 //! An Arc is associated to each Bisecting of the mat.
0034 class MAT_Arc : public Standard_Transient
0035 {
0036 
0037 public:
0038 
0039   
0040   Standard_EXPORT MAT_Arc(const Standard_Integer ArcIndex, const Standard_Integer GeomIndex, const Handle(MAT_BasicElt)& FirstElement, const Handle(MAT_BasicElt)& SecondElement);
0041   
0042   //! Returns the index of <me> in Graph.theArcs.
0043   Standard_EXPORT Standard_Integer Index() const;
0044   
0045   //! Returns  the index associated  of the  geometric
0046   //! representation of <me>.
0047   Standard_EXPORT Standard_Integer GeomIndex() const;
0048   
0049   //! Returns one of the BasicElt equidistant from <me>.
0050   Standard_EXPORT Handle(MAT_BasicElt) FirstElement() const;
0051   
0052   //! Returns the other BasicElt equidistant from <me>.
0053   Standard_EXPORT Handle(MAT_BasicElt) SecondElement() const;
0054   
0055   //! Returns one Node extremity of <me>.
0056   Standard_EXPORT Handle(MAT_Node) FirstNode() const;
0057   
0058   //! Returns the other Node extremity of <me>.
0059   Standard_EXPORT Handle(MAT_Node) SecondNode() const;
0060   
0061   //! an Arc has two Node, if <aNode> egal one
0062   //! Returns the other.
0063   //!
0064   //! if <aNode> is not oh <me>
0065   Standard_EXPORT Handle(MAT_Node) TheOtherNode (const Handle(MAT_Node)& aNode) const;
0066   
0067   //! Returnst True is there is an arc linked to
0068   //! the Node <aNode> located on the side <aSide> of <me>;
0069   //! if <aNode> is not on <me>
0070   Standard_EXPORT Standard_Boolean HasNeighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
0071   
0072   //! Returns the first arc linked to the Node <aNode>
0073   //! located on the side <aSide> of <me>;
0074   //! if HasNeighbour() returns FALSE.
0075   Standard_EXPORT Handle(MAT_Arc) Neighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
0076   
0077   Standard_EXPORT void SetIndex (const Standard_Integer anInteger);
0078   
0079   Standard_EXPORT void SetGeomIndex (const Standard_Integer anInteger);
0080   
0081   Standard_EXPORT void SetFirstElement (const Handle(MAT_BasicElt)& aBasicElt);
0082   
0083   Standard_EXPORT void SetSecondElement (const Handle(MAT_BasicElt)& aBasicElt);
0084   
0085   Standard_EXPORT void SetFirstNode (const Handle(MAT_Node)& aNode);
0086   
0087   Standard_EXPORT void SetSecondNode (const Handle(MAT_Node)& aNode);
0088   
0089   Standard_EXPORT void SetFirstArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
0090   
0091   Standard_EXPORT void SetSecondArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
0092   
0093   Standard_EXPORT void SetNeighbour (const MAT_Side aSide, const Handle(MAT_Node)& aNode, const Handle(MAT_Arc)& anArc);
0094 
0095 
0096 
0097 
0098   DEFINE_STANDARD_RTTIEXT(MAT_Arc,Standard_Transient)
0099 
0100 protected:
0101 
0102 
0103 
0104 
0105 private:
0106 
0107 
0108   Standard_Integer arcIndex;
0109   Standard_Integer geomIndex;
0110   Handle(MAT_BasicElt) firstElement;
0111   Handle(MAT_BasicElt) secondElement;
0112   Handle(MAT_Node) firstNode;
0113   Handle(MAT_Node) secondNode;
0114   Standard_Address firstArcLeft;
0115   Standard_Address firstArcRight;
0116   Standard_Address secondArcRight;
0117   Standard_Address secondArcLeft;
0118 
0119 
0120 };
0121 
0122 
0123 
0124 
0125 
0126 
0127 
0128 #endif // _MAT_Arc_HeaderFile