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 =========================================================================*/
49 #ifndef __vtkImplicitFunction_h
50 #define __vtkImplicitFunction_h
51 
52 #include "vtkObject.h"
53 
55 
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
64  unsigned long GetMTime();
65 
67 
69  double FunctionValue(const double x[3]);
70  double FunctionValue(double x, double y, double z) {
71  double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
73 
75 
77  void FunctionGradient(const double x[3], double g[3]);
78  double *FunctionGradient(const double x[3]) {
79  this->FunctionGradient(x,this->ReturnValue);
80  return this->ReturnValue; };
81  double *FunctionGradient(double x, double y, double z) {
82  double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
84 
86 
88  virtual void SetTransform(vtkAbstractTransform*);
89  virtual void SetTransform(const double elements[16]);
90  vtkGetObjectMacro(Transform,vtkAbstractTransform);
92 
94 
98  virtual double EvaluateFunction(double x[3]) = 0;
99  double EvaluateFunction(double x, double y, double z) {
100  double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
102 
107  virtual void EvaluateGradient(double x[3], double g[3]) = 0;
108 
109 protected:
112 
114  double ReturnValue[3];
115 private:
116  vtkImplicitFunction(const vtkImplicitFunction&); // Not implemented.
117  void operator=(const vtkImplicitFunction&); // Not implemented.
118 };
119 
120 #endif
abstract interface for implicit functions
double * FunctionGradient(double x, double y, double z)
abstract base class for most VTK objects
Definition: vtkObject.h:60
double * FunctionGradient(const double x[3])
double FunctionValue(double x, double y, double z)
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
superclass for all geometric transformations
#define VTK_COMMON_EXPORT
vtkAbstractTransform * Transform
double EvaluateFunction(double x, double y, double z)