VTK
dox/Graphics/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 "vtkPolyDataAlgorithm.h"
00047 
00048 class VTK_GRAPHICS_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm 
00049 {
00050 public:
00052   static vtkPolyDataPointSampler *New();
00053 
00055 
00056   vtkTypeMacro(vtkPolyDataPointSampler,vtkPolyDataAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00063   vtkSetClampMacro(Distance,double,0.0,VTK_LARGE_FLOAT);
00064   vtkGetMacro(Distance,double);
00066   
00068 
00070   vtkGetMacro(GenerateVertexPoints,int);  
00071   vtkSetMacro(GenerateVertexPoints,int);  
00072   vtkBooleanMacro(GenerateVertexPoints,int);  
00074 
00076 
00078   vtkGetMacro(GenerateEdgePoints,int);  
00079   vtkSetMacro(GenerateEdgePoints,int);  
00080   vtkBooleanMacro(GenerateEdgePoints,int);  
00082 
00084 
00086   vtkGetMacro(GenerateInteriorPoints,int);  
00087   vtkSetMacro(GenerateInteriorPoints,int);  
00088   vtkBooleanMacro(GenerateInteriorPoints,int);  
00090 
00092 
00097   vtkGetMacro(GenerateVertices,int);  
00098   vtkSetMacro(GenerateVertices,int);  
00099   vtkBooleanMacro(GenerateVertices,int);  
00101 
00102 protected:
00103   vtkPolyDataPointSampler();
00104   ~vtkPolyDataPointSampler() {}
00105 
00106   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00107 
00108   double Distance;
00109   double Distance2;
00110   
00111   int GenerateVertexPoints;
00112   int GenerateEdgePoints;
00113   int GenerateInteriorPoints;
00114   int GenerateVertices;
00115 
00116   void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
00117   void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts, 
00118                       vtkIdType *pts);
00119   void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts, 
00120                       vtkIdType npts, vtkIdType *pts);
00121 
00122 private:
00123   vtkPolyDataPointSampler(const vtkPolyDataPointSampler&);  // Not implemented.
00124   void operator=(const vtkPolyDataPointSampler&);  // Not implemented.
00125 };
00126 
00127 #endif