85 #ifndef __vtkDecimatePro_h
86 #define __vtkDecimatePro_h
88 #include "vtkFiltersCoreModule.h"
94 class vtkPriorityQueue;
100 void PrintSelf(ostream& os, vtkIndent indent);
119 vtkSetClampMacro(TargetReduction,
double,0.0,1.0);
120 vtkGetMacro(TargetReduction,
double);
127 vtkSetMacro(PreserveTopology,
int);
128 vtkGetMacro(PreserveTopology,
int);
129 vtkBooleanMacro(PreserveTopology,
int);
136 vtkSetClampMacro(FeatureAngle,
double,0.0,180.0);
137 vtkGetMacro(FeatureAngle,
double);
145 vtkSetMacro(Splitting,
int);
146 vtkGetMacro(Splitting,
int);
147 vtkBooleanMacro(Splitting,
int);
154 vtkSetClampMacro(SplitAngle,
double,0.0,180.0);
155 vtkGetMacro(SplitAngle,
double);
165 vtkSetMacro(PreSplitMesh,
int);
166 vtkGetMacro(PreSplitMesh,
int);
167 vtkBooleanMacro(PreSplitMesh,
int);
175 vtkSetClampMacro(MaximumError,
double,0.0,VTK_DOUBLE_MAX);
176 vtkGetMacro(MaximumError,
double);
187 vtkSetMacro(AccumulateError,
int);
188 vtkGetMacro(AccumulateError,
int);
189 vtkBooleanMacro(AccumulateError,
int);
197 vtkSetMacro(ErrorIsAbsolute,
int);
198 vtkGetMacro(ErrorIsAbsolute,
int);
203 vtkSetClampMacro(AbsoluteError,
double,0.0,VTK_DOUBLE_MAX);
204 vtkGetMacro(AbsoluteError,
double);
210 vtkSetMacro(BoundaryVertexDeletion,
int);
211 vtkGetMacro(BoundaryVertexDeletion,
int);
212 vtkBooleanMacro(BoundaryVertexDeletion,
int);
220 vtkSetClampMacro(Degree,
int,25,VTK_CELL_SIZE);
221 vtkGetMacro(Degree,
int);
228 vtkSetClampMacro(InflectionPointRatio,
double,1.001,VTK_DOUBLE_MAX);
229 vtkGetMacro(InflectionPointRatio,
double);
238 vtkIdType GetNumberOfInflectionPoints();
244 void GetInflectionPoints(
double *inflectionPoints);
251 double *GetInflectionPoints();
257 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
279 int EvaluateVertex(vtkIdType ptId,
unsigned short int numTris,
280 vtkIdType *tris, vtkIdType fedges[2]);
281 vtkIdType FindSplit(
int type, vtkIdType fedges[2], vtkIdType& pt1,
282 vtkIdType& pt2, vtkIdList *CollapseTris);
283 int IsValidSplit(
int index);
284 void SplitLoop(vtkIdType fedges[2], vtkIdType& n1, vtkIdType *l1,
285 vtkIdType& n2, vtkIdType *l2);
286 void SplitVertex(vtkIdType ptId,
int type,
unsigned short int numTris,
287 vtkIdType *tris,
int insert);
288 int CollapseEdge(
int type, vtkIdType ptId, vtkIdType collapseId,
289 vtkIdType pt1, vtkIdType pt2, vtkIdList *CollapseTris);
290 void DistributeError(
double error);
322 {this->MaxId = -1; this->Array =
new LocalVertex[sz];};
327 delete [] this->Array;
332 {this->MaxId++; this->Array[this->MaxId] = v;};
345 {this->MaxId = -1; this->Array =
new LocalTri[sz];};
350 delete [] this->Array;
355 {this->MaxId++; this->Array[this->MaxId] = t;};
366 void InitializeQueue(vtkIdType numPts);
368 void Insert(vtkIdType
id,
double error= -1.0);
369 int Pop(
double &error);
370 double DeleteId(vtkIdType
id);
373 vtkPriorityQueue *Queue;
374 vtkDoubleArray *VertexError;
391 vtkIdType NumberOfRemainingTris;
392 double TheSplitAngle;
LocalTri & GetTriangle(vtkIdType i)
void InsertNextTriangle(LocalTri &t)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
concrete dataset represents vertices, lines, polygons, and triangle strips
LocalVertex * LocalVertexPtr
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
LocalVertex & GetVertex(vtkIdType i)
TriArray(const vtkIdType sz)
Superclass for algorithms that produce only polydata as output.
void InsertNextVertex(LocalVertex &v)
double InflectionPointRatio
VertexArray(const vtkIdType sz)
vtkDoubleArray * InflectionPoints
int BoundaryVertexDeletion
reduce the number of triangles in a mesh
vtkIdType GetNumberOfVertices()
vtkIdType GetNumberOfTriangles()
vtkPriorityQueue * EdgeLengths