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
39 #ifndef vtkImplicitSelectionLoop_h
40 #define vtkImplicitSelectionLoop_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkImplicitFunction.h"
44 
45 VTK_ABI_NAMESPACE_BEGIN
46 class vtkPoints;
47 class vtkPolygon;
48 
49 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitSelectionLoop : public vtkImplicitFunction
50 {
51 public:
53 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
64 
66 
70  double EvaluateFunction(double x[3]) override;
72 
76  void EvaluateGradient(double x[3], double n[3]) override;
77 
79 
83  virtual void SetLoop(vtkPoints*);
84  vtkGetObjectMacro(Loop, vtkPoints);
86 
88 
93  vtkSetMacro(AutomaticNormalGeneration, vtkTypeBool);
94  vtkGetMacro(AutomaticNormalGeneration, vtkTypeBool);
95  vtkBooleanMacro(AutomaticNormalGeneration, vtkTypeBool);
97 
99 
103  vtkSetVector3Macro(Normal, double);
104  vtkGetVectorMacro(Normal, double, 3);
106 
110  vtkMTimeType GetMTime() override;
111 
112 protected:
115 
117  double Normal[3];
119 
120 private:
121  void Initialize();
122  vtkPolygon* Polygon;
123 
124  double Origin[3];
125  double Bounds[6]; // bounds of the projected polyon
126  double DeltaX;
127  double DeltaY;
128  double DeltaZ;
129 
130  vtkTimeStamp InitializationTime;
131 
133  void operator=(const vtkImplicitSelectionLoop&) = delete;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #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:29
represent and manipulate 3D points
Definition: vtkPoints.h:29
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:32
record modification and/or execution time
Definition: vtkTimeStamp.h:25
@ Normal
Definition: vtkX3D.h:45
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270