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

vtkProgrammableGlyphFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProgrammableGlyphFilter.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 =========================================================================*/
00075 #ifndef __vtkProgrammableGlyphFilter_h
00076 #define __vtkProgrammableGlyphFilter_h
00077 
00078 #define VTK_COLOR_BY_INPUT  0
00079 #define VTK_COLOR_BY_SOURCE 1
00080 
00081 #include "vtkDataSetToPolyDataFilter.h"
00082 
00083 class vtkPointData;
00084 
00085 class VTK_GRAPHICS_EXPORT vtkProgrammableGlyphFilter : public vtkDataSetToPolyDataFilter
00086 {
00087 public:
00088   vtkTypeRevisionMacro(vtkProgrammableGlyphFilter,vtkDataSetToPolyDataFilter);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00093   static vtkProgrammableGlyphFilter *New();
00094 
00096 
00098   void SetSource(vtkPolyData *source);
00099   vtkPolyData *GetSource();
00101 
00103   void SetGlyphMethod(void (*f)(void *), void *arg);
00104 
00107   void SetGlyphMethodArgDelete(void (*f)(void *));
00108 
00110 
00113   vtkGetMacro(PointId, vtkIdType);
00115 
00117 
00120   vtkGetVector3Macro(Point,double);
00122 
00124 
00127   vtkGetObjectMacro(PointData,vtkPointData);
00129 
00131 
00132   vtkSetMacro(ColorMode,int);
00133   vtkGetMacro(ColorMode,int);
00134   void SetColorModeToColorByInput() 
00135     {this->SetColorMode(VTK_COLOR_BY_INPUT);};
00136   void SetColorModeToColorBySource() 
00137     {this->SetColorMode(VTK_COLOR_BY_SOURCE);};
00138   const char *GetColorModeAsString();
00140 
00141 protected:
00142   vtkProgrammableGlyphFilter();
00143   ~vtkProgrammableGlyphFilter();
00144 
00145   void Execute();
00146 
00147   double Point[3]; // Coordinates of point
00148   vtkIdType PointId; // Current point id during processing
00149   vtkPointData *PointData;
00150   int ColorMode;
00151   
00152   void (*GlyphMethod)(void *); // Support GlyphMethod
00153   void (*GlyphMethodArgDelete)(void *);
00154   void *GlyphMethodArg;
00155   
00156 private:
00157   vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&);  // Not implemented.
00158   void operator=(const vtkProgrammableGlyphFilter&);  // Not implemented.
00159 };
00160 
00161 #endif