VTK  9.6.1
vtkGlyphSource2D.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
25
26#ifndef vtkGlyphSource2D_h
27#define vtkGlyphSource2D_h
28
29#include "vtkFiltersSourcesModule.h" // For export macro
31#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32
33#define VTK_NO_GLYPH 0
34#define VTK_VERTEX_GLYPH 1
35#define VTK_DASH_GLYPH 2
36#define VTK_CROSS_GLYPH 3
37#define VTK_THICKCROSS_GLYPH 4
38#define VTK_TRIANGLE_GLYPH 5
39#define VTK_SQUARE_GLYPH 6
40#define VTK_CIRCLE_GLYPH 7
41#define VTK_DIAMOND_GLYPH 8
42#define VTK_ARROW_GLYPH 9
43#define VTK_THICKARROW_GLYPH 10
44#define VTK_HOOKEDARROW_GLYPH 11
45#define VTK_EDGEARROW_GLYPH 12
46
47#define VTK_MAX_CIRCLE_RESOLUTION 1024
48
49VTK_ABI_NAMESPACE_BEGIN
50class vtkPoints;
52class vtkCellArray;
53
54class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkGlyphSource2D : public vtkPolyDataAlgorithm
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
65
67
70 vtkSetVector3Macro(Center, double);
71 vtkGetVectorMacro(Center, double, 3);
73
75
79 vtkSetClampMacro(Scale, double, 0.0, VTK_DOUBLE_MAX);
80 vtkGetMacro(Scale, double);
82
84
88 vtkSetClampMacro(Scale2, double, 0.0, VTK_DOUBLE_MAX);
89 vtkGetMacro(Scale2, double);
91
93
96 vtkSetVector3Macro(Color, double);
97 vtkGetVectorMacro(Color, double, 3);
99
101
106 vtkSetMacro(Filled, vtkTypeBool);
107 vtkGetMacro(Filled, vtkTypeBool);
108 vtkBooleanMacro(Filled, vtkTypeBool);
110
112
117 vtkSetMacro(Dash, vtkTypeBool);
118 vtkGetMacro(Dash, vtkTypeBool);
119 vtkBooleanMacro(Dash, vtkTypeBool);
121
123
128 vtkSetMacro(Cross, vtkTypeBool);
129 vtkGetMacro(Cross, vtkTypeBool);
130 vtkBooleanMacro(Cross, vtkTypeBool);
132
134
139 vtkSetMacro(RotationAngle, double);
140 vtkGetMacro(RotationAngle, double);
142
144
147 vtkSetClampMacro(Resolution, int, 3, VTK_MAX_CIRCLE_RESOLUTION);
148 vtkGetMacro(Resolution, int);
150
152
156 vtkGetMacro(GlyphType, int);
171
173
178 vtkSetMacro(OutputPointsPrecision, int);
179 vtkGetMacro(OutputPointsPrecision, int);
181
183
188 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
189 vtkGetMacro(TipLength, double);
191
193
198 vtkSetMacro(DoublePointed, bool);
199 vtkGetMacro(DoublePointed, bool);
200 vtkBooleanMacro(DoublePointed, bool);
202
204
209 vtkSetMacro(PointInwards, bool);
210 vtkGetMacro(PointInwards, bool);
211 vtkBooleanMacro(PointInwards, bool);
213
214protected:
216 ~vtkGlyphSource2D() override = default;
217
219
220 double Center[3] = { 0.0, 0.0, 0.0 };
221 double Scale = 1.0;
222 double Scale2 = 1.5;
223 double Color[3] = { 1.0, 1.0, 1.0 };
228 double RotationAngle = 0.0;
229 int Resolution = 8;
231 double TipLength = 0.3;
232 bool DoublePointed = false;
233 bool PointInwards = false;
234
237 unsigned char RGB[3];
238
241 vtkUnsignedCharArray* colors, double scale);
243 vtkUnsignedCharArray* colors, double scale);
245 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
247 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
249 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
251 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
253 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
255 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
257 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
259 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
261 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
262
263private:
264 vtkGlyphSource2D(const vtkGlyphSource2D&) = delete;
265 void operator=(const vtkGlyphSource2D&) = delete;
266};
267
268VTK_ABI_NAMESPACE_END
269#endif
object to represent cell connectivity
void SetGlyphTypeToArrow()
Specify the type of glyph to generate.
void CreateThickArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
virtual void SetGlyphType(int)
Specify the type of glyph to generate.
void SetGlyphTypeToSquare()
Specify the type of glyph to generate.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetGlyphTypeToTriangle()
Specify the type of glyph to generate.
void SetGlyphTypeToCross()
Specify the type of glyph to generate.
void SetGlyphTypeToThickArrow()
Specify the type of glyph to generate.
void SetGlyphTypeToEdgeArrow()
Specify the type of glyph to generate.
void CreateCross(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale)
void CreateThickCross(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateDiamond(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void TransformGlyph(vtkPoints *pts)
void SetGlyphTypeToNone()
Specify the type of glyph to generate.
~vtkGlyphSource2D() override=default
void CreateCircle(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateTriangle(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void SetGlyphTypeToCircle()
Specify the type of glyph to generate.
void SetGlyphTypeToHookedArrow()
Specify the type of glyph to generate.
void CreateEdgeArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
unsigned char RGB[3]
void CreateVertex(vtkPoints *pts, vtkCellArray *verts, vtkUnsignedCharArray *colors)
void CreateArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void SetGlyphTypeToDash()
Specify the type of glyph to generate.
void SetGlyphTypeToDiamond()
Specify the type of glyph to generate.
void CreateHookedArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
static vtkGlyphSource2D * New()
Construct a vertex glyph centered at the origin, scale 1.0, white in color, filled,...
void SetGlyphTypeToThickCross()
Specify the type of glyph to generate.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateDash(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale)
void CreateSquare(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void SetGlyphTypeToVertex()
Specify the type of glyph to generate.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:30
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DIAMOND_GLYPH
#define VTK_SQUARE_GLYPH
#define VTK_TRIANGLE_GLYPH
#define VTK_NO_GLYPH
#define VTK_MAX_CIRCLE_RESOLUTION
#define VTK_VERTEX_GLYPH
#define VTK_THICKCROSS_GLYPH
#define VTK_DASH_GLYPH
#define VTK_HOOKEDARROW_GLYPH
#define VTK_ARROW_GLYPH
#define VTK_EDGEARROW_GLYPH
#define VTK_CIRCLE_GLYPH
#define VTK_CROSS_GLYPH
#define VTK_THICKARROW_GLYPH
#define VTK_DOUBLE_MAX
Definition vtkType.h:207
#define VTK_MARSHALAUTO