55 Language: C++
66 Date: 2002/05
77 Auteur: Sebastien VALETTE
8-
8+
99=========================================================================*/
1010
1111/* ---------------------------------------------------------------------
1212
1313* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
1414* Author : Sebastien Valette
1515*
16- * This software is governed by the CeCILL-B license under French law and
17- * abiding by the rules of distribution of free software. You can use,
18- * modify and/ or redistribute the software under the terms of the CeCILL-B
19- * license as circulated by CEA, CNRS and INRIA at the following URL
20- * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
16+ * This software is governed by the CeCILL-B license under French law and
17+ * abiding by the rules of distribution of free software. You can use,
18+ * modify and/ or redistribute the software under the terms of the CeCILL-B
19+ * license as circulated by CEA, CNRS and INRIA at the following URL
20+ * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
2121* or in the file LICENSE.txt.
2222*
2323* As a counterpart to the access to the source code and rights to copy,
2424* modify and redistribute granted by the license, users are provided only
2525* with a limited warranty and the software's author, the holder of the
2626* economic rights, and the successive licensors have only limited
27- * liability.
27+ * liability.
2828*
2929* The fact that you are presently reading this means that you have had
3030* knowledge of the CeCILL-B license and that you accept its terms.
31- * ------------------------------------------------------------------------ */
31+ * ------------------------------------------------------------------------ */
3232
3333#ifndef __vtkSurfaceBase_h
3434#define __vtkSurfaceBase_h
3939#include < vtkIntArray.h>
4040#include < vtkIdTypeArray.h>
4141#include < vtkBitArray.h>
42- #include < vtkPolyData.h>
42+ #include < vtkPolyData.h>
4343#include < vtkCell.h>
4444#include < vtkCommand.h>
4545#include < vtkCellArray.h>
@@ -66,18 +66,18 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
6666 // / The Constructor vtkSurfaceBase::New();
6767 static vtkSurfaceBase *New ();
6868 vtkTypeMacro (vtkSurfaceBase,vtkPolyData);
69-
69+
7070 // / Create a similar type object.
7171 vtkDataObject *MakeObject ()
7272 {return vtkSurfaceBase::New ();};
73-
73+
7474 // / Embeds a vtkPolyData into a vtkSurfaceBase object.
7575 void CreateFromPolyData (vtkPolyData *input);
76-
76+
7777 // / Set memory allocation in the vtkSurfaceBase object for further Cells
7878 // / and points insertion (this is not mandatory, and maybe useless)
7979 void Init (int numPoints, int numFaces, int numEdges);
80-
80+
8181 // / Set memory allocation in the vtkSurfaceBase object, which is assumed to
8282 // / be as large as the *mesh vtkSurfaceBase
8383 void Init (vtkSurfaceBase *mesh);
@@ -102,7 +102,7 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
102102
103103 // / Flips the edge. If the flip was performed, return -1. Otherwise, the edge already existing is returned.
104104 vtkIdType FlipEdge (vtkIdType edge);
105-
105+
106106 // / Flips the edge. If the resulting edge already exists, it is flipped (an so on). Returns -1 in case of success
107107 vtkIdType FlipEdgeSure (vtkIdType edge);
108108
@@ -112,7 +112,7 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
112112 // / Call this function if you want the surface to be oriented.
113113 // / By default, the surface is oriented.
114114 void SetOrientationOn ();
115-
115+
116116 // / Call this function if you do not want the surface to be oriented.
117117 // / By default, the surface is oriented.
118118 void SetOrientationOff ();
@@ -156,59 +156,59 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
156156
157157 // / Returns the number of edges in the vtkSurfaceBase Object
158158 int GetNumberOfEdges () {return this ->Edges .size ();};
159-
160- // / Returns v1 and v2 as the vertices bounding the edge
159+
160+ // / Returns v1 and v2 as the vertices bounding the edge
161161 void GetEdgeVertices (const vtkIdType& edge, vtkIdType &v1, vtkIdType &v2);
162162
163163 // returns the number of faces adjacvent to the input edge
164164 int GetEdgeNumberOfAdjacentFaces (const vtkIdType &e);
165-
165+
166166 // / Returns the vertices v1, v2 and v3 bounding the face
167167 void GetFaceVertices (const vtkIdType& face,
168168 vtkIdType &v1, vtkIdType &v2, vtkIdType &v3);
169169
170- // / Returns the number of vertices and a pointer to them for the face
170+ // / Returns the number of vertices and a pointer to them for the face
171171 void GetFaceVertices (const vtkIdType& face, vtkIdType &NumberOfVertices,
172172vtkIdType* &Vertices);
173-
173+
174174 // / Returns the coordinates of Point
175175 void GetPointCoordinates (vtkIdType Point, double *x);
176-
176+
177177 // / Returns the valence of the Point V1 i.e. its number of adjacent Points
178178 int GetValence (const vtkIdType& v1);
179-
179+
180180 // / Returns the number of boundaries at Point v1
181181 int GetNumberOfBoundaries (const vtkIdType &v1);
182-
183- // / Conquer from a triangle f1 through the edge bounded by v1 and v2.
184- // / f2 is the conquered triangle and v3 its third vertex
182+
183+ // / Conquer from a triangle f1 through the edge bounded by v1 and v2.
184+ // / f2 is the conquered triangle and v3 its third vertex
185185 // / (v1 and v2 are the first and second vertices)
186186 void Conquer (const vtkIdType& f1,const vtkIdType& v1, const vtkIdType& v2,
187187 vtkIdType &f2, vtkIdType &v3);
188-
188+
189189 // / Returns f1 and f2 as the faces adjacent to the edge.
190190 // / WARNING : if the edge is a boundary edge, f2=-1 (it has only
191191 // / 1 adjacent face)
192192 void GetEdgeFaces (const vtkIdType& e1 , vtkIdType &f1, vtkIdType &f2);
193193
194194 // / Returns the faces adjacent to the edge as an IdList
195195 void GetEdgeFaces (vtkIdType e1 , vtkIdList *Flist);
196-
196+
197197 // / Returns true if the edge is a Manifold one (2 adjacent polygons)
198198 bool IsEdgeManifold (const vtkIdType& e);
199199
200200 // / returns true if the vertex is manifold.
201201 bool IsVertexManifold ( const vtkIdType& iV);
202-
203- // / Returns the List of Points adjacent to the point v1
202+
203+ // / Returns the List of Points adjacent to the point v1
204204 void GetVertexNeighbours (vtkIdType v1, vtkIdList *Output);
205-
206- // / Returns the List of Faces adjacent to the Face
205+
206+ // / Returns the List of Faces adjacent to the Face
207207 void GetFaceNeighbours (vtkIdType Face,vtkIdList *FList);
208208
209- // / Returns the List of Faces adjacent to the Face
209+ // / Returns the List of Faces adjacent to the Face
210210 void GetFaceNeighbours (vtkIdType Face,vtkIdListCollection *FList);
211-
211+
212212 // / Returns the list of edges adjacent to the point v1
213213 void GetVertexNeighbourEdges (vtkIdType v1, vtkIdList *Output);
214214
@@ -220,53 +220,53 @@ vtkIdType* &Edges);
220220
221221 // / Returns the list of faces adjacent to the point v1
222222 void GetVertexNeighbourFaces (const vtkIdType &v1, vtkIdList *Output);
223-
223+
224224 // / Returns the list of vertices adjacent to the list of vertices *Input.
225225 // / Usefull for constructing n-rings
226226 void GetNeighbours (vtkIdList *Input, vtkIdList *Output);
227-
227+
228228 // / Returns the Id of the face having v1, v2 and v3 for vertices.
229229 // / Returns -1 if the face doesn't exist.
230230 vtkIdType IsFace (const vtkIdType &v1, const vtkIdType &v2, const vtkIdType &v3);
231-
231+
232232 // / Returns the Id of the edge (v1,v2).
233233 // / Returns -1 if the edge doesn't exist.
234234 vtkIdType IsEdge (const vtkIdType &v1, const vtkIdType &v2);
235-
235+
236236 // / Returns the Id of the edge between the faces f1 and f2
237237 // / Returns -1 if the edge doesn't exist
238238 vtkIdType IsEdgeBetweenFaces (const vtkIdType &f1, const vtkIdType &f2);
239-
240- // / Returns the third Point of the face f1 (the two first Points are v1 and v2)
239+
240+ // / Returns the third Point of the face f1 (the two first Points are v1 and v2)
241241 vtkIdType GetThirdPoint (const vtkIdType& f1,const vtkIdType& v1,const vtkIdType& v2);
242-
242+
243243 // / Sets the coordinates of Point
244244 void SetPointCoordinates (const vtkIdType &Point, double *x);
245245
246246 // / Returns the first edge in the ring of v1
247247 vtkIdType GetFirstEdge (const vtkIdType& v1);
248-
248+
249249 // / Returns a boundary edge in the ring of v1. If there is no boundary edge, any given edge is returned
250250 vtkIdType GetBoundaryEdge (const vtkIdType& v1);
251251
252252 // / Returns the entropy of the valences of the mesh
253253 double GetValenceEntropy ();
254-
254+
255255 // / writes a text file containing an histogram of the vertices valence distribution
256256 void GetValenceTab (char *FileName);
257257
258258 // / switches the cells orientation (usefull when the mesh is displayed all black...)
259259 void SwitchOrientation ();
260-
260+
261261 // / returns 1 if Vertex is actually used to store a polygon (not deleted). Returns 0 otherwise
262262 int IsVertexActive (const vtkIdType &Vertex) {return (this ->ActiveVertices ->GetValue (Vertex));};
263263
264264 // / returns 1 if Face is actually used to store a polygon (not deleted). Returns 0 otherwise
265265 int IsFaceActive (const vtkIdType &Face) {return (this ->ActivePolygons ->GetValue (Face));};
266266
267- // / returns 1 if Edge is actually used to store an edge (not deleted). Returns 0 otherwise
267+ // / returns 1 if Edge is actually used to store an edge (not deleted). Returns 0 otherwise
268268 int IsEdgeActive (const vtkIdType &e) {return this ->Edges [e].Active ;};
269-
269+
270270 // / Checks the integrity of the structure. Returns true if the structure is OK
271271 bool CheckStructure ();
272272
@@ -276,7 +276,7 @@ vtkIdType* &Edges);
276276protected:
277277
278278 // / the constructor
279- vtkSurfaceBase ();
279+ vtkSurfaceBase ();
280280
281281 // / the desctructor
282282 ~vtkSurfaceBase ();
@@ -453,8 +453,8 @@ vtkIdType &NumberOfVertices, vtkIdType* &Vertices)
453453inline void vtkSurfaceBase::GetFaceVertices (const vtkIdType& face,
454454vtkIdType &NumberOfVertices, vtkIdType* &Vertices)
455455{
456- auto connectivity = this ->Polys ->GetConnectivityArray64 ();
457- auto offsets = this ->Polys ->GetOffsetsArray64 ();
456+ auto connectivity = this ->Polys ->GetConnectivityAOSArray64 ();
457+ auto offsets = this ->Polys ->GetOffsetsAOSArray64 ();
458458 auto offset1 = offsets->GetValue ( face );
459459 auto offset2 = offsets->GetValue ( face + 1 );
460460 NumberOfVertices = offset2 - offset1;
@@ -505,7 +505,7 @@ inline void vtkSurfaceBase::GetPointCoordinates(vtkIdType Point, double *x)
505505 this ->Points ->GetPoint (Point,x);
506506}
507507
508- inline void vtkSurfaceBase::GetEdgeFaces (const vtkIdType& e1 , vtkIdType &f1, vtkIdType &f2)
508+ inline void vtkSurfaceBase::GetEdgeFaces (const vtkIdType& e1 , vtkIdType &f1, vtkIdType &f2)
509509{
510510 Edge &e = Edges[ e1 ];
511511 f1=e.Poly1 ;
0 commit comments