VTK
dox/Filters/Modeling/vtkPolyDataPointSampler.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPolyDataPointSampler.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00043 #ifndef __vtkPolyDataPointSampler_h
00044 #define __vtkPolyDataPointSampler_h
00045 
00046 #include "vtkFiltersModelingModule.h" // For export macro
00047 #include "vtkPolyDataAlgorithm.h"
00048 
00049 class VTKFILTERSMODELING_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm
00050 {
00051 public:
00053   static vtkPolyDataPointSampler *New();
00054 
00056 
00057   vtkTypeMacro(vtkPolyDataPointSampler,vtkPolyDataAlgorithm);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00064   vtkSetClampMacro(Distance,double,0.0,VTK_FLOAT_MAX);
00065   vtkGetMacro(Distance,double);
00067 
00069 
00071   vtkGetMacro(GenerateVertexPoints,int);
00072   vtkSetMacro(GenerateVertexPoints,int);
00073   vtkBooleanMacro(GenerateVertexPoints,int);
00075 
00077 
00079   vtkGetMacro(GenerateEdgePoints,int);
00080   vtkSetMacro(GenerateEdgePoints,int);
00081   vtkBooleanMacro(GenerateEdgePoints,int);
00083 
00085 
00087   vtkGetMacro(GenerateInteriorPoints,int);
00088   vtkSetMacro(GenerateInteriorPoints,int);
00089   vtkBooleanMacro(GenerateInteriorPoints,int);
00091 
00093 
00098   vtkGetMacro(GenerateVertices,int);
00099   vtkSetMacro(GenerateVertices,int);
00100   vtkBooleanMacro(GenerateVertices,int);
00102 
00103 protected:
00104   vtkPolyDataPointSampler();
00105   ~vtkPolyDataPointSampler() {}
00106 
00107   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00108 
00109   double Distance;
00110   double Distance2;
00111 
00112   int GenerateVertexPoints;
00113   int GenerateEdgePoints;
00114   int GenerateInteriorPoints;
00115   int GenerateVertices;
00116 
00117   void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
00118   void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts,
00119                       vtkIdType *pts);
00120   void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts,
00121                       vtkIdType npts, vtkIdType *pts);
00122 
00123 private:
00124   vtkPolyDataPointSampler(const vtkPolyDataPointSampler&);  // Not implemented.
00125   void operator=(const vtkPolyDataPointSampler&);  // Not implemented.
00126 };
00127 
00128 #endif