VTK
vtkSuperquadricSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSuperquadricSource.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 =========================================================================*/
55 #ifndef __vtkSuperquadricSource_h
56 #define __vtkSuperquadricSource_h
57 
58 #include "vtkPolyDataAlgorithm.h"
59 
60 #define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024
61 #define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4
62 #define VTK_MIN_SUPERQUADRIC_ROUNDNESS 1e-24
63 
65 {
66 public:
70  static vtkSuperquadricSource *New();
71 
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
76 
77  vtkSetVector3Macro(Center,double);
78  vtkGetVectorMacro(Center,double,3);
80 
82 
83  vtkSetVector3Macro(Scale,double);
84  vtkGetVectorMacro(Scale,double,3);
86 
88 
90  vtkGetMacro(ThetaResolution,int);
91  void SetThetaResolution(int i);
93 
95 
97  vtkGetMacro(PhiResolution,int);
98  void SetPhiResolution(int i);
100 
102 
105  vtkGetMacro(Thickness,double);
106  vtkSetClampMacro(Thickness,double,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0);
108 
110 
112  vtkGetMacro(PhiRoundness,double);
113  void SetPhiRoundness(double e);
115 
117 
119  vtkGetMacro(ThetaRoundness,double);
120  void SetThetaRoundness(double e);
122 
124 
125  vtkSetMacro(Size,double);
126  vtkGetMacro(Size,double);
128 
130 
132  vtkBooleanMacro(Toroidal,int);
133  vtkGetMacro(Toroidal,int);
134  vtkSetMacro(Toroidal,int);
136 
137 protected:
138  vtkSuperquadricSource(int res=16);
140 
141  int Toroidal;
143  double Thickness;
144  double Size;
145  double PhiRoundness;
148  double Center[3];
149  double Scale[3];
152 
153 private:
154  vtkSuperquadricSource(const vtkSuperquadricSource&); // Not implemented.
155  void operator=(const vtkSuperquadricSource&); // Not implemented.
156 };
157 
158 #endif
159 
#define VTK_GRAPHICS_EXPORT
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
create a polygonal superquadric centered at the origin
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_MIN_SUPERQUADRIC_THICKNESS
Store zero or more vtkInformation instances.