VTK  9.3.20240418
vtkImplicitSelectionLoop.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
58 #ifndef vtkImplicitSelectionLoop_h
59 #define vtkImplicitSelectionLoop_h
60 
61 #include "vtkCommonDataModelModule.h" // For export macro
62 #include "vtkImplicitFunction.h"
63 
64 VTK_ABI_NAMESPACE_BEGIN
65 class vtkPoints;
66 class vtkPolygon;
67 
68 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitSelectionLoop : public vtkImplicitFunction
69 {
70 public:
72 
76  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83 
85 
89  double EvaluateFunction(double x[3]) override;
91 
95  void EvaluateGradient(double x[3], double n[3]) override;
96 
98 
102  virtual void SetLoop(vtkPoints*);
103  vtkGetObjectMacro(Loop, vtkPoints);
105 
107 
112  vtkSetMacro(AutomaticNormalGeneration, vtkTypeBool);
113  vtkGetMacro(AutomaticNormalGeneration, vtkTypeBool);
114  vtkBooleanMacro(AutomaticNormalGeneration, vtkTypeBool);
116 
118 
122  vtkSetVector3Macro(Normal, double);
123  vtkGetVectorMacro(Normal, double, 3);
125 
129  vtkMTimeType GetMTime() override;
130 
131 protected:
134 
136  double Normal[3];
138 
139 private:
140  void Initialize();
141  vtkPolygon* Polygon;
142 
143  double Origin[3];
144  double Bounds[6]; // bounds of the projected polyon
145  double DeltaX;
146  double DeltaY;
147  double DeltaZ;
148 
149  vtkTimeStamp InitializationTime;
150 
152  void operator=(const vtkImplicitSelectionLoop&) = delete;
153 };
154 
155 VTK_ABI_NAMESPACE_END
156 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
implicit function for a selection loop
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods for printing and type information.
vtkMTimeType GetMTime() override
Overload GetMTime() because we depend on the Loop.
void EvaluateGradient(double x[3], double n[3]) override
Evaluate selection loop returning the gradient.
~vtkImplicitSelectionLoop() override
double EvaluateFunction(double x[3]) override
Evaluate selection loop returning a signed distance.
static vtkImplicitSelectionLoop * New()
Instantiate object with no initial loop.
virtual void SetLoop(vtkPoints *)
Set/Get the array of point coordinates defining the loop.
a simple class to control print indentation
Definition: vtkIndent.h:108
represent and manipulate 3D points
Definition: vtkPoints.h:139
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:132
record modification and/or execution time
Definition: vtkTimeStamp.h:44
@ Normal
Definition: vtkX3D.h:45
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270