OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkQuantizePolyDataPoints.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkQuantizePolyDataPoints.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:29:42 $
7   Version:   $Revision: 1.12 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
25 //
26 // A tolerance of zero is expected, though positive values may be used, the
27 // quantization will take place before the tolerance is applied.
28 //
29 // .SECTION Caveats
30 // Merging points can alter topology, including introducing non-manifold
31 // forms. Handling of degenerate cells is controlled by switches in
32 // vtkCleanPolyData.
33 //
34 // .SECTION See Also
35 // vtkCleanPolyData
36
37 #ifndef __vtkQuantizePolyDataPoints_h
38 #define __vtkQuantizePolyDataPoints_h
39
40 #include "vtkCleanPolyData.h"
41
42 class VTK_GRAPHICS_EXPORT vtkQuantizePolyDataPoints : public vtkCleanPolyData
43 {
44 public:
45   static vtkQuantizePolyDataPoints *New();
46   vtkTypeRevisionMacro(vtkQuantizePolyDataPoints,vtkCleanPolyData);
47   void PrintSelf(ostream& os, vtkIndent indent);
48
49   // Description:
50   // Specify quantization grain size
51   vtkSetClampMacro(QFactor,float,1E-5,VTK_LARGE_FLOAT);
52   vtkGetMacro(QFactor,float);
53
54   // Description:
55   // Perform quantization on a point
56   virtual void OperateOnPoint(float in[3], float out[3]);
57
58   // Description:
59   // Perform quantization on bounds
60   virtual void OperateOnBounds(float in[6], float out[6]);
61
62 protected:
63   vtkQuantizePolyDataPoints();
64   ~vtkQuantizePolyDataPoints() {};
65
66   float QFactor;
67 private:
68   vtkQuantizePolyDataPoints(const vtkQuantizePolyDataPoints&);  // Not implemented.
69   void operator=(const vtkQuantizePolyDataPoints&);  // Not implemented.
70 };
71
72 #endif
73
74