VTK  9.3.20240327
vtkImplicitVolume.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
31 #ifndef vtkImplicitVolume_h
32 #define vtkImplicitVolume_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkImplicitFunction.h"
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkIdList;
39 class vtkImageData;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitVolume : public vtkImplicitFunction
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
52 
58  vtkMTimeType GetMTime() override;
59 
61 
66  double EvaluateFunction(double x[3]) override;
68 
72  void EvaluateGradient(double x[3], double n[3]) override;
73 
75 
78  virtual void SetVolume(vtkImageData*);
79  vtkGetObjectMacro(Volume, vtkImageData);
81 
83 
86  vtkSetMacro(OutValue, double);
87  vtkGetMacro(OutValue, double);
89 
91 
94  vtkSetVector3Macro(OutGradient, double);
95  vtkGetVector3Macro(OutGradient, double);
97 
98 protected:
100  ~vtkImplicitVolume() override;
101 
102  vtkImageData* Volume; // the structured points
103  double OutValue;
104  double OutGradient[3];
105  // to replace a static
107 
108 private:
109  vtkImplicitVolume(const vtkImplicitVolume&) = delete;
110  void operator=(const vtkImplicitVolume&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
list of point or cell ids
Definition: vtkIdList.h:132
topologically and geometrically regular array of data
Definition: vtkImageData.h:155
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
treat a volume as if it were an implicit function
virtual void SetVolume(vtkImageData *)
Specify the volume for the implicit function.
void EvaluateGradient(double x[3], double n[3]) override
Evaluate ImplicitVolume gradient.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime() override
Returns the mtime also considering the volume.
double EvaluateFunction(double x[3]) override
Evaluate the ImplicitVolume.
~vtkImplicitVolume() override
static vtkImplicitVolume * New()
Construct an vtkImplicitVolume with no initial volume; the OutValue set to a large negative number; a...
vtkImageData * Volume
a simple class to control print indentation
Definition: vtkIndent.h:108
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270