Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkSuperquadricSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSuperquadricSource.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00066 #ifndef __vtkSuperquadricSource_h
00067 #define __vtkSuperquadricSource_h
00068 
00069 #include "vtkPolyDataSource.h"
00070 
00071 #define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024
00072 #define VTK_MIN_SUPERQUADRIC_THICKNESS  1e-4
00073 #define VTK_MIN_SUPERQUADRIC_ROUNDNESS  1e-24
00074 
00075 class VTK_GRAPHICS_EXPORT vtkSuperquadricSource : public vtkPolyDataSource 
00076 {
00077 public:
00080   static vtkSuperquadricSource *New();
00081 
00082   vtkTypeRevisionMacro(vtkSuperquadricSource,vtkPolyDataSource);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084 
00086 
00087   vtkSetVector3Macro(Center,double);
00088   vtkGetVectorMacro(Center,double,3);
00090 
00092 
00093   vtkSetVector3Macro(Scale,double);
00094   vtkGetVectorMacro(Scale,double,3);
00096 
00098 
00099   vtkGetMacro(ThetaResolution,int);
00100   void SetThetaResolution(int i);
00102 
00104 
00105   vtkGetMacro(PhiResolution,int);
00106   void SetPhiResolution(int i);
00108 
00110 
00112   vtkGetMacro(Thickness,double);
00113   vtkSetClampMacro(Thickness,double,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0);
00115 
00117 
00119   vtkGetMacro(PhiRoundness,double);
00120   void SetPhiRoundness(double e); 
00122 
00124 
00126   vtkGetMacro(ThetaRoundness,double);
00127   void SetThetaRoundness(double e);
00129 
00131 
00132   vtkSetMacro(Size,double);
00133   vtkGetMacro(Size,double);
00135 
00137 
00139   vtkBooleanMacro(Toroidal,int);
00140   vtkGetMacro(Toroidal,int);
00141   vtkSetMacro(Toroidal,int);
00143 
00144 protected:
00145   vtkSuperquadricSource(int res=16);
00146   ~vtkSuperquadricSource() {};
00147 
00148   int Toroidal;
00149   double Thickness;
00150   double Size;
00151   double PhiRoundness;
00152   double ThetaRoundness;
00153   void Execute();
00154   double Center[3];
00155   double Scale[3];
00156   int ThetaResolution;
00157   int PhiResolution;
00158 
00159 private:
00160   vtkSuperquadricSource(const vtkSuperquadricSource&);  // Not implemented.
00161   void operator=(const vtkSuperquadricSource&);  // Not implemented.
00162 };
00163 
00164 #endif
00165 
00166