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

# Graphics/vtkSuperquadricSource.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkSuperquadricSource.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 =========================================================================*/
    00069 #ifndef __vtkSuperquadricSource_h
    00070 #define __vtkSuperquadricSource_h
    00071
    00072 #include "vtkPolyDataSource.h"
    00073
    00074 #define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024
    00075 #define VTK_MIN_SUPERQUADRIC_THICKNESS  1e-4
    00076 #define VTK_MIN_SUPERQUADRIC_ROUNDNESS  1e-24
    00077
    00078 class VTK_GRAPHICS_EXPORT vtkSuperquadricSource : public vtkPolyDataSource
    00079 {
    00080 public:
    00083   static vtkSuperquadricSource *New();
    00084
    00085   vtkTypeRevisionMacro(vtkSuperquadricSource,vtkPolyDataSource);
    00086   void PrintSelf(ostream& os, vtkIndent indent);
    00087
    00089
    00090   vtkSetVector3Macro(Center,float);
    00091   vtkGetVectorMacro(Center,float,3);
    00093
    00095
    00096   vtkSetVector3Macro(Scale,float);
    00097   vtkGetVectorMacro(Scale,float,3);
    00099
    00101
    00102   vtkGetMacro(ThetaResolution,int);
    00103   void SetThetaResolution(int i);
    00105
    00107
    00108   vtkGetMacro(PhiResolution,int);
    00109   void SetPhiResolution(int i);
    00111
    00113
    00115   vtkGetMacro(Thickness,float);
    00116   vtkSetClampMacro(Thickness,float,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0);
    00118
    00120
    00122   vtkGetMacro(PhiRoundness,float);
    00123   void SetPhiRoundness(float e);
    00125
    00127
    00129   vtkGetMacro(ThetaRoundness,float);
    00130   void SetThetaRoundness(float e);
    00132
    00134
    00135   vtkSetMacro(Size,float);
    00136   vtkGetMacro(Size,float);
    00138
    00140
    00142   vtkBooleanMacro(Toroidal,int);
    00143   vtkGetMacro(Toroidal,int);
    00144   vtkSetMacro(Toroidal,int);
    00146
    00147 protected:
    00148   vtkSuperquadricSource(int res=16);
    00149   ~vtkSuperquadricSource() {};
    00150
    00151   int Toroidal;
    00152   float Thickness;
    00153   float Size;
    00154   float PhiRoundness;
    00155   float ThetaRoundness;
    00156   void Execute();
    00157   float Center[3];
    00158   float Scale[3];
    00159   int ThetaResolution;
    00160   int PhiResolution;
    00161
    00162 private:
    00163   vtkSuperquadricSource(const vtkSuperquadricSource&);  // Not implemented.
    00164   void operator=(const vtkSuperquadricSource&);  // Not implemented.
    00165 };
    00166
    00167 #endif
    00168
    00169