VTK  9.3.0
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
48 #ifndef vtkImplicitSelectionLoop_h
49 #define vtkImplicitSelectionLoop_h
50 
51 #include "vtkCommonDataModelModule.h" // For export macro
52 #include "vtkImplicitFunction.h"
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkPoints;
56 class vtkPolygon;
57 
58 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitSelectionLoop : public vtkImplicitFunction
59 {
60 public:
62 
66  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
73 
75 
79  double EvaluateFunction(double x[3]) override;
81 
85  void EvaluateGradient(double x[3], double n[3]) override;
86 
88 
92  virtual void SetLoop(vtkPoints*);
93  vtkGetObjectMacro(Loop, vtkPoints);
95 
97 
102  vtkSetMacro(AutomaticNormalGeneration, vtkTypeBool);
103  vtkGetMacro(AutomaticNormalGeneration, vtkTypeBool);
104  vtkBooleanMacro(AutomaticNormalGeneration, vtkTypeBool);
106 
108 
112  vtkSetVector3Macro(Normal, double);
113  vtkGetVectorMacro(Normal, double, 3);
115 
119  vtkMTimeType GetMTime() override;
120 
121 protected:
124 
126  double Normal[3];
128 
129 private:
130  void Initialize();
131  vtkPolygon* Polygon;
132 
133  double Origin[3];
134  double Bounds[6]; // bounds of the projected polyon
135  double DeltaX;
136  double DeltaY;
137  double DeltaZ;
138 
139  vtkTimeStamp InitializationTime;
140 
142  void operator=(const vtkImplicitSelectionLoop&) = delete;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #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:38
represent and manipulate 3D points
Definition: vtkPoints.h:38
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:41
record modification and/or execution time
Definition: vtkTimeStamp.h:34
@ Normal
Definition: vtkX3D.h:45
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270