1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkQuantizePolyDataPoints.h,v $
6 Date: $Date: 2002/01/22 15:29:42 $
7 Version: $Revision: 1.12 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkQuantizePolyDataPoints - quantizes x,y,z coordinates of points
19 // .SECTION Description
20 // vtkQuantizePolyDataPoints is a subclass of vtkCleanPolyData and
21 // inherits the functionality of vtkCleanPolyData with the addition that
22 // it quantizes the point coordinates before inserting into the point list.
23 // The user should set QFactor to a positive value (0.25 by default) and all
24 // {x,y,z} coordinates will be quantized to that grain size.
26 // A tolerance of zero is expected, though positive values may be used, the
27 // quantization will take place before the tolerance is applied.
30 // Merging points can alter topology, including introducing non-manifold
31 // forms. Handling of degenerate cells is controlled by switches in
37 #ifndef __vtkQuantizePolyDataPoints_h
38 #define __vtkQuantizePolyDataPoints_h
40 #include "vtkCleanPolyData.h"
42 class VTK_GRAPHICS_EXPORT vtkQuantizePolyDataPoints : public vtkCleanPolyData
45 static vtkQuantizePolyDataPoints *New();
46 vtkTypeRevisionMacro(vtkQuantizePolyDataPoints,vtkCleanPolyData);
47 void PrintSelf(ostream& os, vtkIndent indent);
50 // Specify quantization grain size
51 vtkSetClampMacro(QFactor,float,1E-5,VTK_LARGE_FLOAT);
52 vtkGetMacro(QFactor,float);
55 // Perform quantization on a point
56 virtual void OperateOnPoint(float in[3], float out[3]);
59 // Perform quantization on bounds
60 virtual void OperateOnBounds(float in[6], float out[6]);
63 vtkQuantizePolyDataPoints();
64 ~vtkQuantizePolyDataPoints() {};
68 vtkQuantizePolyDataPoints(const vtkQuantizePolyDataPoints&); // Not implemented.
69 void operator=(const vtkQuantizePolyDataPoints&); // Not implemented.