VTK  9.2.6
vtkGlyphSource2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGlyphSource2D.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=========================================================================*/
55#ifndef vtkGlyphSource2D_h
56#define vtkGlyphSource2D_h
57
58#include "vtkFiltersSourcesModule.h" // For export macro
60
61#define VTK_NO_GLYPH 0
62#define VTK_VERTEX_GLYPH 1
63#define VTK_DASH_GLYPH 2
64#define VTK_CROSS_GLYPH 3
65#define VTK_THICKCROSS_GLYPH 4
66#define VTK_TRIANGLE_GLYPH 5
67#define VTK_SQUARE_GLYPH 6
68#define VTK_CIRCLE_GLYPH 7
69#define VTK_DIAMOND_GLYPH 8
70#define VTK_ARROW_GLYPH 9
71#define VTK_THICKARROW_GLYPH 10
72#define VTK_HOOKEDARROW_GLYPH 11
73#define VTK_EDGEARROW_GLYPH 12
74
75#define VTK_MAX_CIRCLE_RESOLUTION 1024
76
77class vtkPoints;
79class vtkCellArray;
80
81class VTKFILTERSSOURCES_EXPORT vtkGlyphSource2D : public vtkPolyDataAlgorithm
82{
83public:
85 void PrintSelf(ostream& os, vtkIndent indent) override;
86
92
94
97 vtkSetVector3Macro(Center, double);
98 vtkGetVectorMacro(Center, double, 3);
100
102
106 vtkSetClampMacro(Scale, double, 0.0, VTK_DOUBLE_MAX);
107 vtkGetMacro(Scale, double);
109
111
115 vtkSetClampMacro(Scale2, double, 0.0, VTK_DOUBLE_MAX);
116 vtkGetMacro(Scale2, double);
118
120
123 vtkSetVector3Macro(Color, double);
124 vtkGetVectorMacro(Color, double, 3);
126
128
133 vtkSetMacro(Filled, vtkTypeBool);
134 vtkGetMacro(Filled, vtkTypeBool);
135 vtkBooleanMacro(Filled, vtkTypeBool);
137
139
144 vtkSetMacro(Dash, vtkTypeBool);
145 vtkGetMacro(Dash, vtkTypeBool);
146 vtkBooleanMacro(Dash, vtkTypeBool);
148
150
155 vtkSetMacro(Cross, vtkTypeBool);
156 vtkGetMacro(Cross, vtkTypeBool);
157 vtkBooleanMacro(Cross, vtkTypeBool);
159
161
166 vtkSetMacro(RotationAngle, double);
167 vtkGetMacro(RotationAngle, double);
169
171
174 vtkSetClampMacro(Resolution, int, 3, VTK_MAX_CIRCLE_RESOLUTION);
175 vtkGetMacro(Resolution, int);
177
179
182 vtkSetClampMacro(GlyphType, int, VTK_NO_GLYPH, VTK_EDGEARROW_GLYPH);
183 vtkGetMacro(GlyphType, int);
184 void SetGlyphTypeToNone() { this->SetGlyphType(VTK_NO_GLYPH); }
185 void SetGlyphTypeToVertex() { this->SetGlyphType(VTK_VERTEX_GLYPH); }
186 void SetGlyphTypeToDash() { this->SetGlyphType(VTK_DASH_GLYPH); }
187 void SetGlyphTypeToCross() { this->SetGlyphType(VTK_CROSS_GLYPH); }
188 void SetGlyphTypeToThickCross() { this->SetGlyphType(VTK_THICKCROSS_GLYPH); }
189 void SetGlyphTypeToTriangle() { this->SetGlyphType(VTK_TRIANGLE_GLYPH); }
190 void SetGlyphTypeToSquare() { this->SetGlyphType(VTK_SQUARE_GLYPH); }
191 void SetGlyphTypeToCircle() { this->SetGlyphType(VTK_CIRCLE_GLYPH); }
192 void SetGlyphTypeToDiamond() { this->SetGlyphType(VTK_DIAMOND_GLYPH); }
193 void SetGlyphTypeToArrow() { this->SetGlyphType(VTK_ARROW_GLYPH); }
194 void SetGlyphTypeToThickArrow() { this->SetGlyphType(VTK_THICKARROW_GLYPH); }
195 void SetGlyphTypeToHookedArrow() { this->SetGlyphType(VTK_HOOKEDARROW_GLYPH); }
196 void SetGlyphTypeToEdgeArrow() { this->SetGlyphType(VTK_EDGEARROW_GLYPH); }
198
200
205 vtkSetMacro(OutputPointsPrecision, int);
206 vtkGetMacro(OutputPointsPrecision, int);
208
209protected:
211 ~vtkGlyphSource2D() override = default;
212
214
215 double Center[3];
216 double Scale;
217 double Scale2;
218 double Color[3];
226
229 unsigned char RGB[3];
230
233 vtkUnsignedCharArray* colors, double scale);
235 vtkUnsignedCharArray* colors, double scale);
237 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
239 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
241 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
243 vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
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);
254
255private:
256 vtkGlyphSource2D(const vtkGlyphSource2D&) = delete;
257 void operator=(const vtkGlyphSource2D&) = delete;
258};
259
260#endif
object to represent cell connectivity
Definition: vtkCellArray.h:296
create 2D glyphs represented by vtkPolyData
void SetGlyphTypeToArrow()
Specify the type of glyph to generate.
void CreateThickArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
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)
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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:149
Superclass for algorithms that produce only polydata as output.
dynamic, self-adjusting array of unsigned char
@ Color
Definition: vtkX3D.h:52
@ scale
Definition: vtkX3D.h:235
int vtkTypeBool
Definition: vtkABI.h:69
#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:165