VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkFiltersProgrammableModule.h" // For export macro
70 #include "vtkPolyDataAlgorithm.h"
71 
72 class vtkPointData;
73 
74 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
75 {
76 public:
77  vtkTypeMacro(vtkProgrammableGlyphFilter,vtkPolyDataAlgorithm);
78  void PrintSelf(ostream& os, vtkIndent indent);
79 
82  static vtkProgrammableGlyphFilter *New();
83 
87  void SetSourceConnection(vtkAlgorithmOutput* output);
88 
90 
92  void SetSourceData(vtkPolyData *source);
93  vtkPolyData *GetSource();
95 
102  typedef void (*ProgrammableMethodCallbackType)(void *arg);
103 
105  void SetGlyphMethod(void (*f)(void *), void *arg);
106 
109  void SetGlyphMethodArgDelete(void (*f)(void *));
110 
112 
115  vtkGetMacro(PointId, vtkIdType);
117 
119 
122  vtkGetVector3Macro(Point,double);
124 
126 
129  vtkGetObjectMacro(PointData,vtkPointData);
131 
133 
134  vtkSetMacro(ColorMode,int);
135  vtkGetMacro(ColorMode,int);
137  {this->SetColorMode(VTK_COLOR_BY_INPUT);};
139  {this->SetColorMode(VTK_COLOR_BY_SOURCE);};
140  const char *GetColorModeAsString();
142 
143 protected:
146 
147  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
148  virtual int FillInputPortInformation(int, vtkInformation *);
149 
150  double Point[3]; // Coordinates of point
151  vtkIdType PointId; // Current point id during processing
152  vtkPointData *PointData;
154 
155  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
156  ProgrammableMethodCallbackType GlyphMethodArgDelete;
158 
159 private:
160  vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&); // Not implemented.
161  void operator=(const vtkProgrammableGlyphFilter&); // Not implemented.
162 };
163 
164 #endif
#define VTK_COLOR_BY_SOURCE
control the generation and placement of glyphs at input points
ProgrammableMethodCallbackType GlyphMethodArgDelete
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_COLOR_BY_INPUT
ProgrammableMethodCallbackType GlyphMethod