VTK
vtkImplicitFunction.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImplicitFunction.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=========================================================================*/
50#ifndef vtkImplicitFunction_h
51#define vtkImplicitFunction_h
52
53#include "vtkCommonDataModelModule.h" // For export macro
54#include "vtkObject.h"
55
57
58class VTKCOMMONDATAMODEL_EXPORT vtkImplicitFunction : public vtkObject
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63
68 vtkMTimeType GetMTime() VTK_OVERRIDE;
69
71
75 double FunctionValue(const double x[3]);
76 double FunctionValue(double x, double y, double z) {
77 double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
79
81
85 void FunctionGradient(const double x[3], double g[3]);
86 double *FunctionGradient(const double x[3]) {
87 this->FunctionGradient(x,this->ReturnValue);
88 return this->ReturnValue; };
89 double *FunctionGradient(double x, double y, double z) {
90 double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
92
94
99 virtual void SetTransform(const double elements[16]);
100 vtkGetObjectMacro(Transform,vtkAbstractTransform);
102
104
110 virtual double EvaluateFunction(double x[3]) = 0;
111 double EvaluateFunction(double x, double y, double z) {
112 double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
114
121 virtual void EvaluateGradient(double x[3], double g[3]) = 0;
122
123protected:
125 ~vtkImplicitFunction() VTK_OVERRIDE;
126
128 double ReturnValue[3];
129private:
130 vtkImplicitFunction(const vtkImplicitFunction&) VTK_DELETE_FUNCTION;
131 void operator=(const vtkImplicitFunction&) VTK_DELETE_FUNCTION;
132};
133
134#endif
superclass for all geometric transformations
abstract interface for implicit functions
virtual void SetTransform(const double elements[16])
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
double * FunctionGradient(const double x[3])
vtkMTimeType GetMTime() override
Overload standard modified time function.
virtual void SetTransform(vtkAbstractTransform *)
Set/Get a transformation to apply to input points before executing the implicit function.
double EvaluateFunction(double x, double y, double z)
double * FunctionGradient(double x, double y, double z)
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FunctionGradient(const double x[3], double g[3])
Evaluate function gradient at position x-y-z and pass back vector.
~vtkImplicitFunction() override
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
Transform
Definition: ADIOSDefs.h:40
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248