fc9b36d6 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
2 | // |
3 | // This file is part of Open CASCADE Technology software library. |
4 | // |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
10 | // |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
13 | |
14 | #ifndef _BRepMesh_Collections_HeaderFile |
15 | #define _BRepMesh_Collections_HeaderFile |
16 | |
17 | #include <gp_Pnt.hxx> |
18 | #include <gp_XYZ.hxx> |
19 | #include <gp_XY.hxx> |
20 | #include <Bnd_B2d.hxx> |
21 | #include <Bnd_Box2d.hxx> |
22 | #include <Standard.hxx> |
23 | #include <NCollection_List.hxx> |
24 | #include <NCollection_Map.hxx> |
25 | #include <NCollection_Vector.hxx> |
26 | #include <NCollection_Handle.hxx> |
27 | #include <NCollection_DataMap.hxx> |
28 | #include <NCollection_IndexedMap.hxx> |
29 | #include <NCollection_IndexedDataMap.hxx> |
30 | #include <NCollection_Array1.hxx> |
31 | #include <NCollection_Sequence.hxx> |
32 | #include <NCollection_CellFilter.hxx> |
33 | #include <NCollection_IncAllocator.hxx> |
34 | #include <NCollection_EBTree.hxx> |
35 | #include <NCollection_UBTreeFiller.hxx> |
36 | #include <BRepMesh_Edge.hxx> |
37 | #include <BRepMesh_Triangle.hxx> |
38 | #include <BRepMesh_PairOfPolygon.hxx> |
39 | #include <BRepMesh_PairOfIndex.hxx> |
40 | #include <BRepMesh_Circle.hxx> |
41 | #include <TopTools_ShapeMapHasher.hxx> |
42 | #include <Handle_Poly_Triangulation.hxx> |
ceb418e1 |
43 | #include <TopoDS_Face.hxx> |
fc9b36d6 |
44 | |
45 | #include <vector> |
46 | |
47 | class BRepMesh_Vertex; |
48 | class TopoDS_Shape; |
49 | class TopoDS_Face; |
50 | class TopoDS_Edge; |
51 | class TopoDS_Vertex; |
fc9b36d6 |
52 | class Handle_BRepMesh_FaceAttribute; |
53 | class BRepMesh_VertexInspector; |
54 | class BRepMesh_CircleInspector; |
55 | class BRepMesh_Classifier; |
56 | class Poly_Triangulation; |
57 | |
58 | //! Short names for collections |
59 | #define N_SEQUENCE NCollection_Sequence |
60 | #define N_VECTOR NCollection_Vector |
61 | #define N_ARRAY1 NCollection_Array1 |
62 | #define N_LIST NCollection_List |
63 | #define N_MAP NCollection_Map |
64 | #define N_HANDLE NCollection_Handle |
65 | #define N_DATAMAP NCollection_DataMap |
66 | #define N_IMAP NCollection_IndexedMap |
67 | #define N_IDMAP NCollection_IndexedDataMap |
68 | #define N_CELLFILTER NCollection_CellFilter |
69 | |
70 | namespace BRepMeshCol |
71 | { |
72 | //! Structure keeping parameters of segment. |
73 | struct Segment |
74 | { |
75 | gp_XY StartPnt; |
76 | gp_XY EndPnt; |
77 | }; |
78 | |
79 | //! Memory allocators |
80 | typedef Handle(NCollection_IncAllocator) Allocator; |
81 | |
82 | //! Short names for hashers |
83 | typedef TopTools_ShapeMapHasher ShapeMapHasher; |
84 | |
85 | //! Sequences |
86 | typedef N_SEQUENCE<Bnd_B2d> SequenceOfBndB2d; |
87 | typedef N_SEQUENCE<Standard_Integer> SequenceOfInteger; |
88 | typedef N_SEQUENCE<Standard_Real> SequenceOfReal; |
89 | |
90 | //! Vectors |
91 | typedef N_VECTOR<BRepMesh_Vertex> VectorOfVertex; |
92 | typedef N_VECTOR<Standard_Integer> VectorOfInteger; |
93 | typedef N_VECTOR<BRepMesh_Circle> VectorOfCircle; |
94 | |
95 | //! Trees |
96 | typedef NCollection_EBTree<Standard_Integer, Bnd_Box2d> BndBox2dTree; |
97 | typedef NCollection_UBTreeFiller<Standard_Integer, Bnd_Box2d> BndBox2dTreeFiller; |
98 | |
99 | //! Arrays |
100 | typedef N_ARRAY1<BRepMesh_Vertex> Array1OfVertexOfDelaun; |
101 | typedef N_ARRAY1<Standard_Integer> Array1OfInteger; |
102 | typedef N_ARRAY1<Standard_Real> Array1OfReal; |
103 | typedef std::vector<Segment> Array1OfSegments; |
104 | |
105 | //! Lists |
106 | typedef N_LIST<gp_XY> ListOfXY; |
107 | typedef N_LIST<BRepMesh_Vertex> ListOfVertex; |
108 | typedef N_LIST<Standard_Integer> ListOfInteger; |
109 | |
110 | //! Maps |
111 | typedef N_MAP<Standard_Integer> MapOfInteger; |
112 | typedef N_MAP<Handle(Poly_Triangulation)> MapOfTriangulation; |
113 | typedef N_MAP<TopoDS_Shape, ShapeMapHasher> MapOfShape; |
114 | |
115 | typedef N_DATAMAP<Standard_Integer, Standard_Integer> MapOfIntegerInteger; |
116 | typedef N_DATAMAP<TopoDS_Vertex, Standard_Integer, ShapeMapHasher> DMapOfVertexInteger; |
117 | typedef N_DATAMAP<TopoDS_Face, Handle_BRepMesh_FaceAttribute, ShapeMapHasher> DMapOfFaceAttribute; |
118 | typedef N_DATAMAP<TopoDS_Shape, BRepMesh_PairOfPolygon, ShapeMapHasher> DMapOfShapePairOfPolygon; |
119 | typedef N_DATAMAP<Standard_Integer, gp_Pnt> DMapOfIntegerPnt; |
120 | typedef N_DATAMAP<Standard_Integer, ListOfXY> DMapOfIntegerListOfXY; |
121 | typedef N_DATAMAP<Standard_Integer, ListOfInteger> DMapOfIntegerListOfInteger; |
122 | typedef N_DATAMAP<TopoDS_Edge, MapOfTriangulation, ShapeMapHasher> DMapOfEdgeListOfTriangulation; |
123 | |
124 | typedef N_IMAP<Standard_Integer> IMapOfInteger; |
125 | typedef N_IMAP<Standard_Real> IMapOfReal; |
126 | typedef N_IMAP<BRepMesh_Triangle> IMapOfElement; |
127 | typedef N_IDMAP<BRepMesh_Edge, BRepMesh_PairOfIndex> IDMapOfLink; |
128 | |
129 | //! CellFilters |
130 | typedef N_CELLFILTER<BRepMesh_CircleInspector> CircleCellFilter; |
131 | typedef N_CELLFILTER<BRepMesh_VertexInspector> VertexCellFilter; |
132 | |
133 | //! Handles |
134 | typedef N_HANDLE<MapOfInteger> HMapOfInteger; |
ceb418e1 |
135 | typedef N_HANDLE<IMapOfInteger> HIMapOfInteger; |
136 | typedef N_HANDLE<DMapOfShapePairOfPolygon> HDMapOfShapePairOfPolygon; |
137 | typedef N_HANDLE<DMapOfIntegerPnt> HDMapOfIntegerPnt; |
fc9b36d6 |
138 | typedef N_HANDLE<BRepMesh_Classifier> HClassifier; |
139 | typedef N_HANDLE<BndBox2dTree> HBndBox2dTree; |
140 | typedef N_HANDLE<Array1OfSegments> HArray1OfSegments; |
141 | |
142 | //! Other data structures |
143 | typedef std::pair<HArray1OfSegments, HBndBox2dTree> SegmentsTree; |
144 | typedef std::vector<SegmentsTree> Array1OfSegmentsTree; |
145 | }; |
146 | |
147 | #endif |