VTK  9.3.1
vtkProjectPointsToPlane.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkProjectPointsToPlane_h
30 #define vtkProjectPointsToPlane_h
31 
32 #include "vtkFiltersPointsModule.h" // For export macro
33 #include "vtkPointSetAlgorithm.h"
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class VTKFILTERSPOINTS_EXPORT vtkProjectPointsToPlane : public vtkPointSetAlgorithm
37 {
38 public:
40 
44  static vtkProjectPointsToPlane* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
54  {
55  X_PLANE = 1,
56  Y_PLANE = 2,
57  Z_PLANE = 3,
58  SPECIFIED_PLANE = 4,
59  BEST_COORDINATE_PLANE = 5,
60  BEST_FIT_PLANE = 6
61  };
62 
64 
75  vtkSetClampMacro(ProjectionType, int, X_PLANE, BEST_FIT_PLANE);
76  vtkGetMacro(ProjectionType, int);
77  void SetProjectionTypeToXPlane() { this->SetProjectionType(X_PLANE); }
78  void SetProjectionTypeToYPlane() { this->SetProjectionType(Y_PLANE); }
79  void SetProjectionTypeToZPlane() { this->SetProjectionType(Z_PLANE); }
80  void SetProjectionTypeToSpecifiedPlane() { this->SetProjectionType(SPECIFIED_PLANE); }
81  void SetProjectionTypeToBestCoordinatePlane() { this->SetProjectionType(BEST_COORDINATE_PLANE); }
82  void SetProjectionTypeToBestFitPlane() { this->SetProjectionType(BEST_FIT_PLANE); }
84 
86 
91  vtkSetVector3Macro(Origin, double);
92  vtkSetVector3Macro(Normal, double);
93  vtkGetVector3Macro(Origin, double);
94  vtkGetVector3Macro(Normal, double);
96 
98 
105  vtkSetMacro(OutputPointsPrecision, int);
106  vtkGetMacro(OutputPointsPrecision, int);
108 
109 protected:
111  ~vtkProjectPointsToPlane() override = default;
112 
114  double Origin[3];
115  double Normal[3];
117 
119 
120 private:
122  void operator=(const vtkProjectPointsToPlane&) = delete;
123 };
124 
125 VTK_ABI_NAMESPACE_END
126 #endif
PlaneProjectionType
Define the options available for point projection.
void SetProjectionTypeToZPlane()
Specify the type of projection to perform.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
project all input points to a plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetProjectionTypeToSpecifiedPlane()
Specify the type of projection to perform.
void SetProjectionTypeToXPlane()
Specify the type of projection to perform.
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for algorithms that produce output of the same type as input.
void SetProjectionTypeToBestCoordinatePlane()
Specify the type of projection to perform.
static vtkPointSetAlgorithm * New()
Store zero or more vtkInformation instances.
void SetProjectionTypeToBestFitPlane()
Specify the type of projection to perform.
void SetProjectionTypeToYPlane()
Specify the type of projection to perform.