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
#define VTK_GRAPHICS_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
represent and manipulate point attribute data
Definition: vtkPointData.h:35
#define VTK_COLOR_BY_SOURCE
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int vtkIdType
Definition: vtkType.h:255
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:37
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
Store zero or more vtkInformation instances.