VTK
vtkParametricSuperEllipsoid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParametricSuperEllipsoid.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 =========================================================================*/
43 #ifndef vtkParametricSuperEllipsoid_h
44 #define vtkParametricSuperEllipsoid_h
45 
46 #include "vtkCommonComputationalGeometryModule.h" // For export macro
47 #include "vtkParametricFunction.h"
48 
49 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSuperEllipsoid : public vtkParametricFunction
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54 
67 
71  int GetDimension() VTK_OVERRIDE {return 2;}
72 
74 
77  vtkSetMacro(XRadius,double);
78  vtkGetMacro(XRadius,double);
80 
82 
85  vtkSetMacro(YRadius,double);
86  vtkGetMacro(YRadius,double);
88 
90 
93  vtkSetMacro(ZRadius,double);
94  vtkGetMacro(ZRadius,double);
96 
98 
101  vtkSetMacro(N1,double);
102  vtkGetMacro(N1,double);
104 
106 
109  vtkSetMacro(N2,double);
110  vtkGetMacro(N2,double);
112 
121  void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
122 
136  double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
137 
138 protected:
140  ~vtkParametricSuperEllipsoid() VTK_OVERRIDE;
141 
142  // Variables
143  double XRadius;
144  double YRadius;
145  double ZRadius;
146  double N1;
147  double N2;
148 
149 private:
150  vtkParametricSuperEllipsoid(const vtkParametricSuperEllipsoid&) VTK_DELETE_FUNCTION;
151  void operator=(const vtkParametricSuperEllipsoid&) VTK_DELETE_FUNCTION;
152 
156  double Power ( double x, double n );
157 
158 };
159 
160 #endif
int GetDimension() override
Return the parametric dimension of the class.
virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9])=0
Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9])=0
Performs the mapping $f(uvw)->(Pt,Duvw)$f.
#define N2
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define N1
abstract interface for parametric functions
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...