VTK  9.1.0
vtkImplicitSelectionLoop.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImplicitSelectionLoop.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=========================================================================*/
67#ifndef vtkImplicitSelectionLoop_h
68#define vtkImplicitSelectionLoop_h
69
70#include "vtkCommonDataModelModule.h" // For export macro
71#include "vtkImplicitFunction.h"
72
73class vtkPoints;
74class vtkPolygon;
75
76class VTKCOMMONDATAMODEL_EXPORT vtkImplicitSelectionLoop : public vtkImplicitFunction
77{
78public:
80
84 void PrintSelf(ostream& os, vtkIndent indent) override;
86
91
93
97 double EvaluateFunction(double x[3]) override;
99
103 void EvaluateGradient(double x[3], double n[3]) override;
104
106
110 virtual void SetLoop(vtkPoints*);
111 vtkGetObjectMacro(Loop, vtkPoints);
113
115
120 vtkSetMacro(AutomaticNormalGeneration, vtkTypeBool);
121 vtkGetMacro(AutomaticNormalGeneration, vtkTypeBool);
122 vtkBooleanMacro(AutomaticNormalGeneration, vtkTypeBool);
124
126
130 vtkSetVector3Macro(Normal, double);
131 vtkGetVectorMacro(Normal, double, 3);
133
138
139protected:
142
144 double Normal[3];
146
147private:
148 void Initialize();
149 vtkPolygon* Polygon;
150
151 double Origin[3];
152 double Bounds[6]; // bounds of the projected polyon
153 double DeltaX;
154 double DeltaY;
155 double DeltaZ;
156
157 vtkTimeStamp InitializationTime;
158
159private:
161 void operator=(const vtkImplicitSelectionLoop&) = delete;
162};
163
164#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:113
represent and manipulate 3D points
Definition: vtkPoints.h:143
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:149
record modification and/or execution time
Definition: vtkTimeStamp.h:52
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287