VTK  9.3.20240424
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
71#ifndef vtkProgrammableGlyphFilter_h
72#define vtkProgrammableGlyphFilter_h
73
74#define VTK_COLOR_BY_INPUT 0
75#define VTK_COLOR_BY_SOURCE 1
76
77#include "vtkFiltersProgrammableModule.h" // For export macro
79
80VTK_ABI_NAMESPACE_BEGIN
81class vtkPointData;
82
83class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
84{
85public:
87 void PrintSelf(ostream& os, vtkIndent indent) override;
88
94
101
103
111
120 typedef void (*ProgrammableMethodCallbackType)(void* arg);
121
125 void SetGlyphMethod(void (*f)(void*), void* arg);
126
131 void SetGlyphMethodArgDelete(void (*f)(void*));
132
134
138 vtkGetMacro(PointId, vtkIdType);
140
142
146 vtkGetVector3Macro(Point, double);
148
150
155 vtkGetObjectMacro(PointData, vtkPointData);
157
159
162 vtkSetMacro(ColorMode, int);
163 vtkGetMacro(ColorMode, int);
164 void SetColorModeToColorByInput() { this->SetColorMode(VTK_COLOR_BY_INPUT); }
165 void SetColorModeToColorBySource() { this->SetColorMode(VTK_COLOR_BY_SOURCE); }
166 const char* GetColorModeAsString();
168
169protected:
172
175
176 double Point[3]; // Coordinates of point
177 vtkIdType PointId; // Current point id during processing
180
181 ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
182 ProgrammableMethodCallbackType GlyphMethodArgDelete;
184
185private:
187 void operator=(const vtkProgrammableGlyphFilter&) = delete;
188};
189
190VTK_ABI_NAMESPACE_END
191#endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
control the generation and placement of glyphs at input points
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
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.
const char * GetColorModeAsString()
Either color by the input or source scalar data.
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.
static vtkProgrammableGlyphFilter * New()
Construct object with nullptr GlyphMethod() and no source object.
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