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

vtkLinearExtrusionFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLinearExtrusionFilter.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 =========================================================================*/
00068 #ifndef __vtkLinearExtrusionFilter_h
00069 #define __vtkLinearExtrusionFilter_h
00070 
00071 #include "vtkPolyDataToPolyDataFilter.h"
00072 
00073 class vtkDataArray;
00074 
00075 #define VTK_VECTOR_EXTRUSION 1
00076 #define VTK_NORMAL_EXTRUSION 2
00077 #define VTK_POINT_EXTRUSION 3
00078 
00079 class VTK_GRAPHICS_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataToPolyDataFilter 
00080 {
00081 public:
00082   vtkTypeRevisionMacro(vtkLinearExtrusionFilter,vtkPolyDataToPolyDataFilter);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084 
00087   static vtkLinearExtrusionFilter *New();
00088 
00090 
00091   vtkSetClampMacro(ExtrusionType,int,VTK_VECTOR_EXTRUSION,VTK_POINT_EXTRUSION);
00092   vtkGetMacro(ExtrusionType,int);
00093   void SetExtrusionTypeToVectorExtrusion()
00094     {this->SetExtrusionType(VTK_VECTOR_EXTRUSION);};
00095   void SetExtrusionTypeToNormalExtrusion()
00096     {this->SetExtrusionType(VTK_NORMAL_EXTRUSION);};
00097   void SetExtrusionTypeToPointExtrusion()
00098     {this->SetExtrusionType(VTK_POINT_EXTRUSION);};
00100 
00102 
00103   vtkSetMacro(Capping,int);
00104   vtkGetMacro(Capping,int);
00105   vtkBooleanMacro(Capping,int);
00107 
00109 
00110   vtkSetMacro(ScaleFactor,double);
00111   vtkGetMacro(ScaleFactor,double);
00113 
00115 
00117   vtkSetVector3Macro(Vector,double);
00118   vtkGetVectorMacro(Vector,double,3);
00120 
00122 
00124   vtkSetVector3Macro(ExtrusionPoint,double);
00125   vtkGetVectorMacro(ExtrusionPoint,double,3);
00127 
00128 protected:
00129   vtkLinearExtrusionFilter();
00130   ~vtkLinearExtrusionFilter() {};
00131 
00132   void Execute();
00133   int ExtrusionType;
00134   int Capping;
00135   double ScaleFactor;
00136   double Vector[3];
00137   double ExtrusionPoint[3];
00138 
00139   //BTX
00140   double *(vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, 
00141                                                    vtkDataArray *normals);
00142   double *ViaNormal(double x[3], vtkIdType id, vtkDataArray *normals);
00143   double *ViaVector(double x[3], vtkIdType id, vtkDataArray *normals=0);
00144   double *ViaPoint(double x[3], vtkIdType id, vtkDataArray *normals=0);
00145   //ETX
00146  
00147 private:
00148   vtkLinearExtrusionFilter(const vtkLinearExtrusionFilter&);  // Not implemented.
00149   void operator=(const vtkLinearExtrusionFilter&);  // Not implemented.
00150 };
00151 
00152 #endif