VTK
|
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 =========================================================================*/ 00063 #ifndef __vtkProgrammableGlyphFilter_h 00064 #define __vtkProgrammableGlyphFilter_h 00065 00066 #define VTK_COLOR_BY_INPUT 0 00067 #define VTK_COLOR_BY_SOURCE 1 00068 00069 #include "vtkPolyDataAlgorithm.h" 00070 00071 class vtkPointData; 00072 00073 class VTK_GRAPHICS_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm 00074 { 00075 public: 00076 vtkTypeRevisionMacro(vtkProgrammableGlyphFilter,vtkPolyDataAlgorithm); 00077 void PrintSelf(ostream& os, vtkIndent indent); 00078 00081 static vtkProgrammableGlyphFilter *New(); 00082 00084 00086 void SetSource(vtkPolyData *source); 00087 vtkPolyData *GetSource(); 00089 00091 void SetGlyphMethod(void (*f)(void *), void *arg); 00092 00095 void SetGlyphMethodArgDelete(void (*f)(void *)); 00096 00098 00101 vtkGetMacro(PointId, vtkIdType); 00103 00105 00108 vtkGetVector3Macro(Point,double); 00110 00112 00115 vtkGetObjectMacro(PointData,vtkPointData); 00117 00119 00120 vtkSetMacro(ColorMode,int); 00121 vtkGetMacro(ColorMode,int); 00122 void SetColorModeToColorByInput() 00123 {this->SetColorMode(VTK_COLOR_BY_INPUT);}; 00124 void SetColorModeToColorBySource() 00125 {this->SetColorMode(VTK_COLOR_BY_SOURCE);}; 00126 const char *GetColorModeAsString(); 00128 00129 protected: 00130 vtkProgrammableGlyphFilter(); 00131 ~vtkProgrammableGlyphFilter(); 00132 00133 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00134 virtual int FillInputPortInformation(int, vtkInformation *); 00135 00136 double Point[3]; // Coordinates of point 00137 vtkIdType PointId; // Current point id during processing 00138 vtkPointData *PointData; 00139 int ColorMode; 00140 00141 void (*GlyphMethod)(void *); // Support GlyphMethod 00142 void (*GlyphMethodArgDelete)(void *); 00143 void *GlyphMethodArg; 00144 00145 private: 00146 vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&); // Not implemented. 00147 void operator=(const vtkProgrammableGlyphFilter&); // Not implemented. 00148 }; 00149 00150 #endif