1 // Created on: 1993-10-29
2 // Created by: Christophe MARION
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 _HLRAlgo_PolyData_HeaderFile
18 #define _HLRAlgo_PolyData_HeaderFile
20 #include <HLRAlgo_BiPoint.hxx>
21 #include <Standard.hxx>
22 #include <Standard_Type.hxx>
24 #include <Standard_Integer.hxx>
25 #include <TColgp_HArray1OfXYZ.hxx>
26 #include <HLRAlgo_HArray1OfTData.hxx>
27 #include <HLRAlgo_HArray1OfPHDat.hxx>
28 #include <Standard_Transient.hxx>
29 #include <TColgp_Array1OfXYZ.hxx>
30 #include <HLRAlgo_Array1OfTData.hxx>
31 #include <HLRAlgo_Array1OfPHDat.hxx>
32 #include <Standard_Boolean.hxx>
34 class HLRAlgo_EdgeStatus;
36 class HLRAlgo_PolyData;
37 DEFINE_STANDARD_HANDLE(HLRAlgo_PolyData, Standard_Transient)
39 //! Data structure of a set of Triangles.
40 class HLRAlgo_PolyData : public Standard_Transient
46 Standard_Integer Index, Min, Max;
52 Standard_Real Param, TolParam, TolAng, Tolerance;
57 Standard_Real XMin, YMin, ZMin, XMax, YMax, ZMax;
59 //! The default constructor.
64 //! The initializing constructor.
66 const Standard_Real& theXMin,
67 const Standard_Real& theYMin,
68 const Standard_Real& theZMin,
69 const Standard_Real& theXMax,
70 const Standard_Real& theYMax,
71 const Standard_Real& theZMax) :
82 Standard_EXPORT HLRAlgo_PolyData();
84 Standard_EXPORT void HNodes (const Handle(TColgp_HArray1OfXYZ)& HNodes);
86 Standard_EXPORT void HTData (const Handle(HLRAlgo_HArray1OfTData)& HTData);
88 Standard_EXPORT void HPHDat (const Handle(HLRAlgo_HArray1OfPHDat)& HPHDat);
90 void FaceIndex (const Standard_Integer I);
92 Standard_Integer FaceIndex() const;
94 TColgp_Array1OfXYZ& Nodes() const;
96 HLRAlgo_Array1OfTData& TData() const;
98 HLRAlgo_Array1OfPHDat& PHDat() const;
100 Standard_EXPORT void UpdateGlobalMinMax (Box& theBox);
102 Standard_Boolean Hiding() const;
104 //! process hiding between <Pt1> and <Pt2>.
105 Standard_EXPORT void HideByPolyData (const HLRAlgo_BiPoint::PointsT& thePoints, Triangle& theTriangle, HLRAlgo_BiPoint::IndicesT& theIndices, const Standard_Boolean HidingShell, HLRAlgo_EdgeStatus& status);
107 FaceIndices& Indices()
109 return myFaceIndices;
112 DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyData,Standard_Transient)
117 void hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoints,
118 Triangle& theTriangle,
119 const Standard_Boolean Crossing,
120 const Standard_Boolean HideBefore,
121 const Standard_Integer TrFlags,
122 HLRAlgo_EdgeStatus& status);
124 FaceIndices myFaceIndices;
125 Handle(TColgp_HArray1OfXYZ) myHNodes;
126 Handle(HLRAlgo_HArray1OfTData) myHTData;
127 Handle(HLRAlgo_HArray1OfPHDat) myHPHDat;
131 #include <HLRAlgo_PolyData.lxx>
133 #endif // _HLRAlgo_PolyData_HeaderFile