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

dox/Graphics/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 =========================================================================*/ 00055 #ifndef __vtkSuperquadricSource_h 00056 #define __vtkSuperquadricSource_h 00057 00058 #include "vtkPolyDataSource.h" 00059 00060 #define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024 00061 #define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4 00062 #define VTK_MIN_SUPERQUADRIC_ROUNDNESS 1e-24 00063 00064 class VTK_GRAPHICS_EXPORT vtkSuperquadricSource : public vtkPolyDataSource 00065 { 00066 public: 00069 static vtkSuperquadricSource *New(); 00070 00071 vtkTypeRevisionMacro(vtkSuperquadricSource,vtkPolyDataSource); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 00075 00076 vtkSetVector3Macro(Center,double); 00077 vtkGetVectorMacro(Center,double,3); 00079 00081 00082 vtkSetVector3Macro(Scale,double); 00083 vtkGetVectorMacro(Scale,double,3); 00085 00087 00088 vtkGetMacro(ThetaResolution,int); 00089 void SetThetaResolution(int i); 00091 00093 00094 vtkGetMacro(PhiResolution,int); 00095 void SetPhiResolution(int i); 00097 00099 00101 vtkGetMacro(Thickness,double); 00102 vtkSetClampMacro(Thickness,double,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0); 00104 00106 00108 vtkGetMacro(PhiRoundness,double); 00109 void SetPhiRoundness(double e); 00111 00113 00115 vtkGetMacro(ThetaRoundness,double); 00116 void SetThetaRoundness(double e); 00118 00120 00121 vtkSetMacro(Size,double); 00122 vtkGetMacro(Size,double); 00124 00126 00128 vtkBooleanMacro(Toroidal,int); 00129 vtkGetMacro(Toroidal,int); 00130 vtkSetMacro(Toroidal,int); 00132 00133 protected: 00134 vtkSuperquadricSource(int res=16); 00135 ~vtkSuperquadricSource() {}; 00136 00137 int Toroidal; 00138 double Thickness; 00139 double Size; 00140 double PhiRoundness; 00141 double ThetaRoundness; 00142 void Execute(); 00143 double Center[3]; 00144 double Scale[3]; 00145 int ThetaResolution; 00146 int PhiResolution; 00147 00148 private: 00149 vtkSuperquadricSource(const vtkSuperquadricSource&); // Not implemented. 00150 void operator=(const vtkSuperquadricSource&); // Not implemented. 00151 }; 00152 00153 #endif 00154 00155