VTK
vtkPolyDataPointSampler.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataPointSampler.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
41 #ifndef vtkPolyDataPointSampler_h
42 #define vtkPolyDataPointSampler_h
43 
44 #include "vtkFiltersModelingModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 class VTKFILTERSMODELING_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm
48 {
49 public:
53  static vtkPolyDataPointSampler *New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
68  vtkSetClampMacro(Distance,double,0.0,VTK_FLOAT_MAX);
69  vtkGetMacro(Distance,double);
71 
73 
77  vtkGetMacro(GenerateVertexPoints,vtkTypeBool);
78  vtkSetMacro(GenerateVertexPoints,vtkTypeBool);
79  vtkBooleanMacro(GenerateVertexPoints,vtkTypeBool);
81 
83 
87  vtkGetMacro(GenerateEdgePoints,vtkTypeBool);
88  vtkSetMacro(GenerateEdgePoints,vtkTypeBool);
89  vtkBooleanMacro(GenerateEdgePoints,vtkTypeBool);
91 
93 
97  vtkGetMacro(GenerateInteriorPoints,vtkTypeBool);
98  vtkSetMacro(GenerateInteriorPoints,vtkTypeBool);
99  vtkBooleanMacro(GenerateInteriorPoints,vtkTypeBool);
101 
103 
110  vtkGetMacro(GenerateVertices,vtkTypeBool);
111  vtkSetMacro(GenerateVertices,vtkTypeBool);
112  vtkBooleanMacro(GenerateVertices,vtkTypeBool);
114 
115 protected:
118 
120 
121  double Distance;
122  double Distance2;
123 
128 
129  void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
130  void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts,
131  vtkIdType *pts);
132  void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts,
133  vtkIdType npts, vtkIdType *pts);
134 
135 private:
137  void operator=(const vtkPolyDataPointSampler&) = delete;
138 };
139 
140 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkPolyDataPointSampler::Distance
double Distance
Definition: vtkPolyDataPointSampler.h:121
vtkPolyDataPointSampler::GenerateInteriorPoints
vtkTypeBool GenerateInteriorPoints
Definition: vtkPolyDataPointSampler.h:126
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataPointSampler::Distance2
double Distance2
Definition: vtkPolyDataPointSampler.h:122
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataPointSampler::GenerateVertices
vtkTypeBool GenerateVertices
Definition: vtkPolyDataPointSampler.h:127
vtkPolyDataAlgorithm.h
vtkPolyDataPointSampler
generate points from vtkPolyData
Definition: vtkPolyDataPointSampler.h:47
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:167
vtkPolyDataPointSampler::~vtkPolyDataPointSampler
~vtkPolyDataPointSampler() override
Definition: vtkPolyDataPointSampler.h:117
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkPolyDataPointSampler::GenerateEdgePoints
vtkTypeBool GenerateEdgePoints
Definition: vtkPolyDataPointSampler.h:125
vtkPolyDataPointSampler::GenerateVertexPoints
vtkTypeBool GenerateVertexPoints
Definition: vtkPolyDataPointSampler.h:124
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41