VTK
vtkSuperquadric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSuperquadric.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 =========================================================================*/
41 #ifndef vtkSuperquadric_h
42 #define vtkSuperquadric_h
43 
44 #include "vtkCommonDataModelModule.h" // For export macro
45 #include "vtkImplicitFunction.h"
46 
47 #define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4
48 
50 {
51 public:
55  static vtkSuperquadric *New();
56 
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
60  // ImplicitFunction interface
61  double EvaluateFunction(double x[3]);
62  double EvaluateFunction(double x, double y, double z)
63  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
64  void EvaluateGradient(double x[3], double g[3]);
65 
67 
68  vtkSetVector3Macro(Center,double);
69  vtkGetVectorMacro(Center,double,3);
71 
73 
74  vtkSetVector3Macro(Scale,double);
75  vtkGetVectorMacro(Scale,double,3);
77 
79 
81  vtkGetMacro(Thickness,double);
84 
86 
88  vtkGetMacro(PhiRoundness,double);
89  void SetPhiRoundness(double e);
91 
93 
95  vtkGetMacro(ThetaRoundness,double);
96  void SetThetaRoundness(double e);
98 
100 
101  vtkSetMacro(Size,double);
102  vtkGetMacro(Size,double);
104 
106 
108  vtkBooleanMacro(Toroidal,int);
109  vtkGetMacro(Toroidal,int);
110  vtkSetMacro(Toroidal,int);
112 
113 protected:
116 
117  int Toroidal;
118  double Thickness;
119  double Size;
120  double PhiRoundness;
122  double Center[3];
123  double Scale[3];
124 private:
125  vtkSuperquadric(const vtkSuperquadric&); // Not implemented.
126  void operator=(const vtkSuperquadric&); // Not implemented.
127 };
128 
129 #endif
130 
131 
vtkgl::z
GLdouble GLdouble z
Definition: vtkgl.h:11754
vtkSuperquadric::Toroidal
int Toroidal
Definition: vtkSuperquadric.h:117
VTK_MIN_SUPERQUADRIC_THICKNESS
#define VTK_MIN_SUPERQUADRIC_THICKNESS
Definition: vtkSuperquadric.h:47
vtkSuperquadric::Thickness
double Thickness
Definition: vtkSuperquadric.h:118
vtkSuperquadric::EvaluateFunction
double EvaluateFunction(double x[3])
vtkSuperquadric::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkSuperquadric::Size
double Size
Definition: vtkSuperquadric.h:119
vtkCommonDataModelModule.h
vtkImplicitFunction::EvaluateFunction
virtual double EvaluateFunction(double x[3])=0
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkSuperquadric::ThetaRoundness
double ThetaRoundness
Definition: vtkSuperquadric.h:121
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkSuperquadric::vtkSuperquadric
vtkSuperquadric()
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:58
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkSuperquadric::New
static vtkSuperquadric * New()
vtkSuperquadric::PhiRoundness
double PhiRoundness
Definition: vtkSuperquadric.h:120
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSuperquadric::EvaluateFunction
double EvaluateFunction(double x, double y, double z)
Definition: vtkSuperquadric.h:62
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkgl::g
GLboolean GLboolean g
Definition: vtkgl.h:12312
vtkSuperquadric::EvaluateGradient
void EvaluateGradient(double x[3], double g[3])
vtkImplicitFunction.h
vtkSuperquadric
implicit function for a Superquadric
Definition: vtkSuperquadric.h:50
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkSuperquadric::SetThetaRoundness
void SetThetaRoundness(double e)
vtkSuperquadric::~vtkSuperquadric
~vtkSuperquadric()
Definition: vtkSuperquadric.h:115
vtkSuperquadric::SetPhiRoundness
void SetPhiRoundness(double e)