Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:15:11

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_Node_HeaderFile
0018 #define _MAT_Node_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Transient.hxx>
0026 #include <MAT_Arc.hxx>
0027 #include <NCollection_Sequence.hxx>
0028 #include <MAT_BasicElt.hxx>
0029 class MAT_Arc;
0030 
0031 //! Node of Graph.
0032 class MAT_Node : public Standard_Transient
0033 {
0034 
0035 public:
0036   Standard_EXPORT MAT_Node(const int                   GeomIndex,
0037                            const occ::handle<MAT_Arc>& LinkedArc,
0038                            const double                Distance);
0039 
0040   //! Returns the index associated of the geometric
0041   //! representation of <me>.
0042   Standard_EXPORT int GeomIndex() const;
0043 
0044   //! Returns the index associated of the node
0045   Standard_EXPORT int Index() const;
0046 
0047   //! Returns in <S> the Arcs linked to <me>.
0048   Standard_EXPORT void LinkedArcs(NCollection_Sequence<occ::handle<MAT_Arc>>& S) const;
0049 
0050   //! Returns in <S> the BasicElts equidistant
0051   //! to <me>.
0052   Standard_EXPORT void NearElts(NCollection_Sequence<occ::handle<MAT_BasicElt>>& S) const;
0053 
0054   Standard_EXPORT double Distance() const;
0055 
0056   //! Returns True if <me> is a pending Node.
0057   //! (ie : the number of Arc Linked = 1)
0058   Standard_EXPORT bool PendingNode() const;
0059 
0060   //! Returns True if <me> belongs to the figure.
0061   Standard_EXPORT bool OnBasicElt() const;
0062 
0063   //! Returns True if the distance of <me> is Infinite
0064   Standard_EXPORT bool Infinite() const;
0065 
0066   //! Set the index associated of the node
0067   Standard_EXPORT void SetIndex(const int anIndex);
0068 
0069   Standard_EXPORT void SetLinkedArc(const occ::handle<MAT_Arc>& anArc);
0070 
0071   DEFINE_STANDARD_RTTIEXT(MAT_Node, Standard_Transient)
0072 
0073 private:
0074   int    nodeIndex;
0075   int    geomIndex;
0076   void*  aLinkedArc;
0077   double distance;
0078 };
0079 
0080 #endif // _MAT_Node_HeaderFile