Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:51

0001 // Created on: 1992-02-18
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-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 _HLRAlgo_PolyAlgo_HeaderFile
0018 #define _HLRAlgo_PolyAlgo_HeaderFile
0019 
0020 #include <HLRAlgo_PolyData.hxx>
0021 #include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
0022 
0023 class HLRAlgo_EdgeStatus;
0024 class HLRAlgo_PolyShellData;
0025 
0026 class HLRAlgo_PolyAlgo;
0027 DEFINE_STANDARD_HANDLE(HLRAlgo_PolyAlgo, Standard_Transient)
0028 
0029 //! to remove Hidden lines on Triangulations.
0030 class HLRAlgo_PolyAlgo : public Standard_Transient
0031 {
0032 
0033 public:
0034 
0035   Standard_EXPORT HLRAlgo_PolyAlgo();
0036 
0037   Standard_EXPORT void Init (const Standard_Integer theNbShells);
0038 
0039   const NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& PolyShell() const { return myHShell; }
0040 
0041   NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& ChangePolyShell() { return myHShell; }
0042 
0043   Standard_EXPORT void Clear();
0044 
0045   //! Prepare all the data to process the algo.
0046   Standard_EXPORT void Update();
0047 
0048   void InitHide()
0049   {
0050     myCurShell = 0;
0051     NextHide();
0052   }
0053 
0054   Standard_Boolean MoreHide() const { return myFound; }
0055 
0056   Standard_EXPORT void NextHide();
0057 
0058   //! process hiding between <Pt1> and <Pt2>.
0059   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide (HLRAlgo_EdgeStatus& status,
0060                                                   Standard_Integer& Index,
0061                                                   Standard_Boolean& reg1,
0062                                                   Standard_Boolean& regn,
0063                                                   Standard_Boolean& outl,
0064                                                   Standard_Boolean& intl);
0065 
0066   void InitShow()
0067   {
0068     myCurShell = 0;
0069     NextShow();
0070   }
0071 
0072   Standard_Boolean MoreShow() const { return myFound; }
0073 
0074   Standard_EXPORT void NextShow();
0075 
0076   //! process hiding between <Pt1> and <Pt2>.
0077   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (Standard_Integer& Index,
0078                                                   Standard_Boolean& reg1,
0079                                                   Standard_Boolean& regn,
0080                                                   Standard_Boolean& outl,
0081                                                   Standard_Boolean& intl);
0082 
0083   DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient)
0084 
0085 private:
0086 
0087   NCollection_Array1<Handle(HLRAlgo_PolyShellData)> myHShell;
0088   HLRAlgo_PolyData::Triangle myTriangle;
0089   HLRAlgo_ListIteratorOfListOfBPoint mySegListIt;
0090   Standard_Integer myNbrShell;
0091   Standard_Integer myCurShell;
0092   Standard_Boolean myFound;
0093 
0094 };
0095 
0096 #endif // _HLRAlgo_PolyAlgo_HeaderFile