summaryrefslogtreecommitdiff
path: root/inc/BRepMesh_DataStructureOfDelaun.hxx
blob: b9c1800b105665cee724ffcdb5e774878a5933bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepMesh_DataStructureOfDelaun_HeaderFile
#define _BRepMesh_DataStructureOfDelaun_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_BRepMesh_DataStructureOfDelaun_HeaderFile
#include <Handle_BRepMesh_DataStructureOfDelaun.hxx>
#endif

#ifndef _BRepMesh_VertexTool_HeaderFile
#include <BRepMesh_VertexTool.hxx>
#endif
#ifndef _BRepMesh_IDMapOfLinkOfDataStructureOfDelaun_HeaderFile
#include <BRepMesh_IDMapOfLinkOfDataStructureOfDelaun.hxx>
#endif
#ifndef _BRepMesh_ListOfInteger_HeaderFile
#include <BRepMesh_ListOfInteger.hxx>
#endif
#ifndef _BRepMesh_IMapOfElementOfDataStructureOfDelaun_HeaderFile
#include <BRepMesh_IMapOfElementOfDataStructureOfDelaun.hxx>
#endif
#ifndef _BRepMesh_MapOfInteger_HeaderFile
#include <BRepMesh_MapOfInteger.hxx>
#endif
#ifndef _BRepMesh_BaseAllocator_HeaderFile
#include <BRepMesh_BaseAllocator.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _BRepMesh_PairOfIndex_HeaderFile
#include <BRepMesh_PairOfIndex.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
class BRepMesh_Vertex;
class BRepMesh_VertexTool;
class BRepMesh_Edge;
class BRepMesh_Triangle;


//! Describes  the data structure  necessary  for  the <br>
//!          mesh  algorithms  in  two  dimensions  plane or on <br>
//!          surface by meshing in UV space. <br>
class BRepMesh_DataStructureOfDelaun : public MMgt_TShared {

public:

  //! <NodeNumber>   is just  an   evaluation of the <br>
//!          presumed  number of nodes  in this mesh.   The <br>
//!          Mesh   data  structure will   be automatically <br>
//!          redimensioned if necessary. <br>
  Standard_EXPORT   BRepMesh_DataStructureOfDelaun(const BRepMesh_BaseAllocator& theAllocator,const Standard_Integer NodeNumber = 100);
  //! Adds a node to the  mesh  if  the node is  not <br>
//!          already in the Mesh.  Returns the index of the <br>
//!          node in the structure. <br>
  Standard_EXPORT     Standard_Integer AddNode(const BRepMesh_Vertex& theNode) ;
  //! Get the value of node <Index>. <br>
  Standard_EXPORT    const BRepMesh_Vertex& GetNode(const Standard_Integer Index) ;
   const BRepMesh_Vertex& operator ()(const Standard_Integer Index) 
{
  return GetNode(Index);
}
  //! Get the list of node <Index>. <br>
  Standard_EXPORT    const BRepMesh_ListOfInteger& GetNodeList(const Standard_Integer Index) ;
  //! Removes the node of index <index> from the mesh. <br>
  Standard_EXPORT     void ForceRemoveNode(const Standard_Integer Index) ;
  //! Removes the link of index <index> from the mesh. <br>
  Standard_EXPORT     void ForceRemoveLink(const Standard_Integer Index) ;
  //! Removes the all nodes and sets new map of <br>
//! nodes from the mesh. <br>
//! For internal use only. <br>
  Standard_EXPORT     void ReplaceNodes(const BRepMesh_VertexTool& NewNodes) ;
  //! Removes the node of index <index> from the mesh. <br>
  Standard_EXPORT     void RemoveNode(const Standard_Integer Index) ;
  //! Changes the UV  value of node of index <Index>  by <br>
//!          <newNode>. Returns false if <newnode> is already in <br>
//!          the structure. <br>
  Standard_EXPORT     Standard_Boolean MoveNode(const Standard_Integer Index,const BRepMesh_Vertex& newNode) ;
  //! Gives the number of nodes in this mesh. <br>
  Standard_EXPORT     Standard_Integer NbNodes() const;
  //! Adds a Link  to the  mesh if  the Link is  not <br>
//!          already in the structure. Returns the index of <br>
//!          the link in the structure. <br>
  Standard_EXPORT     Standard_Integer AddLink(const BRepMesh_Edge& theLink) ;
  //! Get the value of Link <Index>. <br>
  Standard_EXPORT    const BRepMesh_Edge& GetLink(const Standard_Integer Index) ;
  //! Removes the Link of  index  <Index> from the <br>
//!          mesh. <br>
  Standard_EXPORT     void RemoveLink(const Standard_Integer Index) ;
  //! Substitutes  the  Link  of  index  <Index>  by <br>
//!          <newLink> clear the connectivity. <br>
  Standard_EXPORT     Standard_Boolean SubstituteLink(const Standard_Integer Index,const BRepMesh_Edge& newLink) ;
  //! Gives the number of elements in this mesh. <br>
  Standard_EXPORT     Standard_Integer NbLinks() const;
  //! Adds an element  to  the mesh  if it    is not <br>
//!          already in the  Mesh. Returns the index of the <br>
//!          element in the structure. <br>
  Standard_EXPORT     Standard_Integer AddElement(const BRepMesh_Triangle& theElement) ;
  //! Get the value of Element <Index>. <br>
  Standard_EXPORT    const BRepMesh_Triangle& GetElement(const Standard_Integer Index) ;
  //! Removes the element of index <Index> in the mesh. <br>
  Standard_EXPORT     void RemoveElement(const Standard_Integer Index) ;
  //! Substitutes  the  element   of  index  <Index>  by <br>
//!          <newElement>. The links connectivity is updated. <br>
  Standard_EXPORT     Standard_Boolean SubstituteElement(const Standard_Integer Index,const BRepMesh_Triangle& newElement) ;
  //! Gives the number of elements in this mesh. <br>
  Standard_EXPORT     Standard_Integer NbElements() const;
  //!  Removes all elements <br>
  Standard_EXPORT     void ClearDomain() ;
  //! Finds the index of the node.  Returns 0 if the <br>
//!          node is not in the mesh. <br>
  Standard_EXPORT     Standard_Integer IndexOf(const BRepMesh_Vertex& aNode) ;
  //! Finds the index of the Link.  Returns 0 if the <br>
//!          Link is not in the mesh. <br>
  Standard_EXPORT     Standard_Integer IndexOf(const BRepMesh_Edge& aLink) const;
  //! Finds the index  of the Element.  Returns 0 if <br>
//!          the Element is not in the mesh. <br>
  Standard_EXPORT     Standard_Integer IndexOf(const BRepMesh_Triangle& anElement) const;
  //! Gives the list of  Link's indices handling the <br>
//!          node <theNode>. <br>
  Standard_EXPORT    const BRepMesh_ListOfInteger& LinkNeighboursOf(const Standard_Integer theNode) const;
  //! Gives the element's indices conected <br>
//!          to <theLink>. <br>
  Standard_EXPORT    const BRepMesh_PairOfIndex& ElemConnectedTo(const Standard_Integer theLink) const;
  //! Gives  the  list  of element's indices <br>
  Standard_EXPORT    const BRepMesh_MapOfInteger& ElemOfDomain() const;
  //! Gives  the  list  of link's indices <br>
  Standard_EXPORT    const BRepMesh_MapOfInteger& LinkOfDomain() const;
  //! This method  substitute the deleted  items  by <br>
//!          the last in  Indexed Data  Maps  to  have only <br>
//!          non-deleted  elements, links  or  nodes in the <br>
//!          structure. <br>
  Standard_EXPORT     void ClearDeleted() ;
  //! Give informations on map. <br>
  Standard_EXPORT     void Statistics(Standard_OStream& flot) const;
  
  Standard_EXPORT    const BRepMesh_BaseAllocator& Allocator() const;
  //! Give the data structure for cell size and <br>
//!          tolerance initialization. <br>
  Standard_EXPORT     BRepMesh_VertexTool& Data() ;




  DEFINE_STANDARD_RTTI(BRepMesh_DataStructureOfDelaun)

protected:




private: 

  //! Deletes  the element of  index <Index> in <br>
//!          the mesh. Used by RemoveElement. <br>
  Standard_EXPORT     void ClearElement(const Standard_Integer Index,const BRepMesh_Triangle& theElem) ;

BRepMesh_VertexTool myNodes;
BRepMesh_IDMapOfLinkOfDataStructureOfDelaun myLinks;
BRepMesh_ListOfInteger myDelLinks;
BRepMesh_IMapOfElementOfDataStructureOfDelaun myElements;
BRepMesh_MapOfInteger myElemOfDomain;
BRepMesh_MapOfInteger myLinkOfDomain;
BRepMesh_BaseAllocator myAllocator;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif