00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00041
#ifndef __vtkSuperquadric_h
00042
#define __vtkSuperquadric_h
00043
00044
#include "vtkImplicitFunction.h"
00045
00046 #define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4
00047
00048 class VTK_FILTERING_EXPORT vtkSuperquadric :
public vtkImplicitFunction
00049 {
00050
public:
00054
static vtkSuperquadric *
New();
00055
00056 vtkTypeRevisionMacro(vtkSuperquadric,
vtkImplicitFunction);
00057
void PrintSelf(ostream& os,
vtkIndent indent);
00058
00059
00060
double EvaluateFunction(
double x[3]);
00061 double EvaluateFunction(
double x,
double y,
double z)
00062 {
return this->
vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00063
void EvaluateGradient(
double x[3],
double g[3]);
00064
00066
00067 vtkSetVector3Macro(Center,
double);
00068 vtkGetVectorMacro(Center,
double,3);
00070
00072
00073 vtkSetVector3Macro(Scale,
double);
00074 vtkGetVectorMacro(Scale,
double,3);
00076
00078
00080 vtkGetMacro(Thickness,
double);
00081 vtkSetClampMacro(Thickness,
double,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0f);
00083
00085
00087 vtkGetMacro(PhiRoundness,
double);
00088
void SetPhiRoundness(
double e);
00090
00092
00094 vtkGetMacro(ThetaRoundness,
double);
00095
void SetThetaRoundness(
double e);
00097
00099
00100 vtkSetMacro(Size,
double);
00101 vtkGetMacro(Size,
double);
00103
00105
00107 vtkBooleanMacro(Toroidal,
int);
00108 vtkGetMacro(Toroidal,
int);
00109 vtkSetMacro(Toroidal,
int);
00111
00112
protected:
00113 vtkSuperquadric();
00114 ~vtkSuperquadric() {};
00115
00116 int Toroidal;
00117 double Thickness;
00118 double Size;
00119 double PhiRoundness;
00120 double ThetaRoundness;
00121 double Center[3];
00122 double Scale[3];
00123
private:
00124 vtkSuperquadric(
const vtkSuperquadric&);
00125
void operator=(
const vtkSuperquadric&);
00126 };
00127
00128
#endif
00129
00130