VTK
vtkProgrammableGlyphFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgrammableGlyphFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
63 #ifndef __vtkProgrammableGlyphFilter_h
64 #define __vtkProgrammableGlyphFilter_h
65 
66 #define VTK_COLOR_BY_INPUT 0
67 #define VTK_COLOR_BY_SOURCE 1
68 
69 #include "vtkPolyDataAlgorithm.h"
70 
71 class vtkPointData;
72 
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent);
78 
82 
84 
86  void SetSource(vtkPolyData *source);
87  vtkPolyData *GetSource();
89 
96  typedef void (*ProgrammableMethodCallbackType)(void *arg);
97 
99  void SetGlyphMethod(void (*f)(void *), void *arg);
100 
103  void SetGlyphMethodArgDelete(void (*f)(void *));
104 
106 
109  vtkGetMacro(PointId, vtkIdType);
111 
113 
116  vtkGetVector3Macro(Point,double);
118 
120 
123  vtkGetObjectMacro(PointData,vtkPointData);
125 
127 
128  vtkSetMacro(ColorMode,int);
129  vtkGetMacro(ColorMode,int);
131  {this->SetColorMode(VTK_COLOR_BY_INPUT);};
133  {this->SetColorMode(VTK_COLOR_BY_SOURCE);};
134  const char *GetColorModeAsString();
136 
137 protected:
140 
142  virtual int FillInputPortInformation(int, vtkInformation *);
143 
144  double Point[3]; // Coordinates of point
145  vtkIdType PointId; // Current point id during processing
148 
149  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
150  ProgrammableMethodCallbackType GlyphMethodArgDelete;
152 
153 private:
154  vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&); // Not implemented.
155  void operator=(const vtkProgrammableGlyphFilter&); // Not implemented.
156 };
157 
158 #endif