VTK  9.3.0
vtkProgrammableGlyphFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
61 #ifndef vtkProgrammableGlyphFilter_h
62 #define vtkProgrammableGlyphFilter_h
63 
64 #define VTK_COLOR_BY_INPUT 0
65 #define VTK_COLOR_BY_SOURCE 1
66 
67 #include "vtkFiltersProgrammableModule.h" // For export macro
68 #include "vtkPolyDataAlgorithm.h"
69 
70 VTK_ABI_NAMESPACE_BEGIN
71 class vtkPointData;
72 
73 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
84 
91 
93 
101 
110  typedef void (*ProgrammableMethodCallbackType)(void* arg);
111 
115  void SetGlyphMethod(void (*f)(void*), void* arg);
116 
121  void SetGlyphMethodArgDelete(void (*f)(void*));
122 
124 
128  vtkGetMacro(PointId, vtkIdType);
130 
132 
136  vtkGetVector3Macro(Point, double);
138 
140 
145  vtkGetObjectMacro(PointData, vtkPointData);
147 
149 
152  vtkSetMacro(ColorMode, int);
153  vtkGetMacro(ColorMode, int);
154  void SetColorModeToColorByInput() { this->SetColorMode(VTK_COLOR_BY_INPUT); }
155  void SetColorModeToColorBySource() { this->SetColorMode(VTK_COLOR_BY_SOURCE); }
156  const char* GetColorModeAsString();
158 
159 protected:
162 
165 
166  double Point[3]; // Coordinates of point
167  vtkIdType PointId; // Current point id during processing
170 
171  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
172  ProgrammableMethodCallbackType GlyphMethodArgDelete;
174 
175 private:
177  void operator=(const vtkProgrammableGlyphFilter&) = delete;
178 };
179 
180 VTK_ABI_NAMESPACE_END
181 #endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:39
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
control the generation and placement of glyphs at input points
static vtkProgrammableGlyphFilter * New()
Construct object with nullptr GlyphMethod() and no source object.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
const char * GetColorModeAsString()
Either color by the input or source scalar data.
void SetColorModeToColorByInput()
Either color by the input or source scalar data.
~vtkProgrammableGlyphFilter() override
void SetColorModeToColorBySource()
Either color by the input or source scalar data.
ProgrammableMethodCallbackType GlyphMethodArgDelete
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetSourceConnection(vtkAlgorithmOutput *output)
Setup a connection for the source to use as the glyph.
void SetGlyphMethodArgDelete(void(*f)(void *))
Set the arg delete method.
void SetSourceData(vtkPolyData *source)
Set/Get the source to use for this glyph.
void SetGlyphMethod(void(*f)(void *), void *arg)
Specify function to be called for each input point.
ProgrammableMethodCallbackType GlyphMethod
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * GetSource()
Set/Get the source to use for this glyph.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_COLOR_BY_SOURCE
#define VTK_COLOR_BY_INPUT
int vtkIdType
Definition: vtkType.h:315