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

dox/Filtering/vtkSuperquadric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSuperquadric.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00045 #ifndef __vtkSuperquadric_h
00046 #define __vtkSuperquadric_h
00047 
00048 #include "vtkImplicitFunction.h"
00049 
00050 #define VTK_MIN_SUPERQUADRIC_THICKNESS  1e-4
00051 
00052 class VTK_FILTERING_EXPORT vtkSuperquadric : public vtkImplicitFunction
00053 {
00054 public:
00058   static vtkSuperquadric *New();
00059 
00060   vtkTypeRevisionMacro(vtkSuperquadric,vtkImplicitFunction);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00063   // ImplicitFunction interface
00064   float EvaluateFunction(float x[3]);
00065   float EvaluateFunction(float x, float y, float z)
00066     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00067   void EvaluateGradient(float x[3], float g[3]);
00068 
00070 
00071   vtkSetVector3Macro(Center,float);
00072   vtkGetVectorMacro(Center,float,3);
00074 
00076 
00077   vtkSetVector3Macro(Scale,float);
00078   vtkGetVectorMacro(Scale,float,3);
00080 
00082 
00084   vtkGetMacro(Thickness,float);
00085   vtkSetClampMacro(Thickness,float,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0f);
00087 
00089 
00091   vtkGetMacro(PhiRoundness,float);
00092   void SetPhiRoundness(float e); 
00094 
00096 
00098   vtkGetMacro(ThetaRoundness,float);
00099   void SetThetaRoundness(float e);
00101 
00103 
00104   vtkSetMacro(Size,float);
00105   vtkGetMacro(Size,float);
00107 
00109 
00111   vtkBooleanMacro(Toroidal,int);
00112   vtkGetMacro(Toroidal,int);
00113   vtkSetMacro(Toroidal,int);
00115 
00116 protected:
00117   vtkSuperquadric();
00118   ~vtkSuperquadric() {};
00119 
00120   int Toroidal;
00121   float Thickness;
00122   float Size;
00123   float PhiRoundness;
00124   float ThetaRoundness;
00125   float Center[3];
00126   float Scale[3];
00127 private:
00128   vtkSuperquadric(const vtkSuperquadric&);  // Not implemented.
00129   void operator=(const vtkSuperquadric&);  // Not implemented.
00130 };
00131 
00132 #endif
00133 
00134