66#ifndef vtkQuadricDecimation_h
67#define vtkQuadricDecimation_h
70#include "vtkFiltersCoreModule.h"
73VTK_ABI_NAMESPACE_BEGIN
93 vtkSetClampMacro(TargetReduction,
double, 0.0, 1.0);
94 vtkGetMacro(TargetReduction,
double);
140 vtkSetMacro(Regularization,
double);
141 vtkGetMacro(Regularization,
double);
156 vtkSetMacro(BoundaryWeightFactor,
double);
157 vtkGetMacro(BoundaryWeightFactor,
double);
164 vtkGetMacro(MapPointData,
bool);
165 vtkSetMacro(MapPointData,
bool);
166 vtkBooleanMacro(MapPointData,
bool);
199 vtkSetMacro(ScalarsWeight,
double);
200 vtkSetMacro(VectorsWeight,
double);
201 vtkSetMacro(NormalsWeight,
double);
202 vtkSetMacro(TCoordsWeight,
double);
203 vtkSetMacro(TensorsWeight,
double);
204 vtkGetMacro(ScalarsWeight,
double);
205 vtkGetMacro(VectorsWeight,
double);
206 vtkGetMacro(NormalsWeight,
double);
207 vtkGetMacro(TCoordsWeight,
double);
208 vtkGetMacro(TensorsWeight,
double);
216 vtkGetMacro(ActualReduction,
double);
275 const double t0[3],
const double t1[3],
const double t2[3],
const double* x);
286 "the edge to interpolate point data")
287 void SetPointAttributeArray(
vtkIdType ptId, const
double* x);
288 void SetPointAttributeArray(
vtkIdType ptId[2], const
double* x);
296 void GetAttributeComponents();
298 double TargetReduction;
299 double ActualReduction;
303 bool MapPointData = false;
311 double ScalarsWeight;
312 double VectorsWeight;
313 double NormalsWeight;
314 double TCoordsWeight;
315 double TensorsWeight;
317 int NumberOfEdgeCollapses;
323 int NumberOfComponents;
336 double Regularization = 0.05;
340 double BoundaryWeightFactor = 1.0;
344 int AttributeComponents[6];
345 double AttributeScale[6];
dynamic, self-adjusting array of double
keep track of edges (edge is pair of integer id's)
list of point or cell ids
a simple class to control print indentation
represent and manipulate point attribute data
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
a list of ids arranged in priority order
reduce the number of triangles in a mesh
void AddBoundaryConstraints()
Free boundary edges are weighted.
double * VolumeConstraints
void FindAffectedEdges(vtkIdType p1Id, vtkIdType p2Id, vtkIdList *edges)
Find all edges that will have an endpoint change ids because of an edge collapse.
void ComputeNumberOfComponents()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
ErrorQuadric * ErrorQuadrics
void ComputeQuadric(vtkIdType pointId)
Compute quadric for this vertex.
double ComputeCost2(vtkIdType edgeId, double *x)
Compute cost for contracting this edge and the point that gives us this cost.
static vtkQuadricDecimation * New()
vtkIdType GetEdgeCellId(vtkIdType p1Id, vtkIdType p2Id)
Find a cell that uses this edge.
double ComputeCost(vtkIdType edgeId, double *x)
Compute cost for contracting this edge and the point that gives us this cost.
int CollapseEdge(vtkIdType pt0Id, vtkIdType pt1Id)
Do the dirty work of eliminating the edge; return the number of triangles deleted.
vtkIdList * CollapseCellIds
~vtkQuadricDecimation() override
int TrianglePlaneCheck(const double t0[3], const double t1[3], const double t2[3], const double *x)
void InitializeQuadrics(vtkIdType numPts)
Compute quadric for all vertices.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddQuadric(vtkIdType oldPtId, vtkIdType newPtId)
Add the quadrics for these 2 points since the edge between them has been collapsed.
int IsGoodPlacement(vtkIdType pt0Id, vtkIdType pt1Id, const double *x)
void UpdateEdgeData(vtkIdType pt0Id, vtkIdType pt1Id)
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
#define VTK_DEPRECATED_IN_9_3_0(reason)