VTK  9.1.0
vtkGraphToGlyphs.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphToGlyphs.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
62 #ifndef vtkGraphToGlyphs_h
63 #define vtkGraphToGlyphs_h
64 
65 #include "vtkPolyDataAlgorithm.h"
66 #include "vtkRenderingCoreModule.h" // For export macro
67 #include "vtkSmartPointer.h" // for SP ivars
68 
70 class vtkGraphToPoints;
71 class vtkGlyph3D;
72 class vtkGlyphSource2D;
73 class vtkRenderer;
74 class vtkSphereSource;
75 
76 class VTKRENDERINGCORE_EXPORT vtkGraphToGlyphs : public vtkPolyDataAlgorithm
77 {
78 public:
79  static vtkGraphToGlyphs* New();
81  void PrintSelf(ostream& os, vtkIndent indent) override;
82 
83  enum
84  {
85  VERTEX = 1,
93  SPHERE
94  };
95 
97 
103  vtkSetMacro(GlyphType, int);
104  vtkGetMacro(GlyphType, int);
106 
108 
111  vtkSetMacro(Filled, bool);
112  vtkGetMacro(Filled, bool);
113  vtkBooleanMacro(Filled, bool);
115 
117 
122  vtkSetMacro(ScreenSize, double);
123  vtkGetMacro(ScreenSize, double);
125 
127 
130  virtual void SetRenderer(vtkRenderer* ren);
133 
135 
139  virtual void SetScaling(bool b);
140  virtual bool GetScaling();
142 
146  vtkMTimeType GetMTime() override;
147 
148 protected:
150  ~vtkGraphToGlyphs() override;
151 
156 
161 
168  bool Filled;
169  double ScreenSize;
170 
171 private:
172  vtkGraphToGlyphs(const vtkGraphToGlyphs&) = delete;
173  void operator=(const vtkGraphToGlyphs&) = delete;
174 };
175 
176 #endif
vtkGlyphSource2D
create 2D glyphs represented by vtkPolyData
Definition: vtkGlyphSource2D.h:76
vtkGraphToGlyphs::Filled
bool Filled
Definition: vtkGraphToGlyphs.h:168
vtkGraphToGlyphs::GetScaling
virtual bool GetScaling()
Whether to use the input array to process in order to scale the vertices.
vtkGraphToGlyphs::SetScaling
virtual void SetScaling(bool b)
Whether to use the input array to process in order to scale the vertices.
vtkGraphToGlyphs::CROSS
@ CROSS
Definition: vtkGraphToGlyphs.h:87
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkGraphToGlyphs::GraphToPoints
vtkSmartPointer< vtkGraphToPoints > GraphToPoints
Definition: vtkGraphToGlyphs.h:162
vtkGraphToGlyphs::GlyphType
int GlyphType
Definition: vtkGraphToGlyphs.h:167
vtkSmartPointer< vtkGraphToPoints >
vtkGraphToGlyphs::DistanceToCamera
vtkSmartPointer< vtkDistanceToCamera > DistanceToCamera
Definition: vtkGraphToGlyphs.h:166
vtkGraphToGlyphs::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Set the input type of the algorithm to vtkGraph.
vtkGraphToGlyphs::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphToGlyphs::TRIANGLE
@ TRIANGLE
Definition: vtkGraphToGlyphs.h:89
vtkPolyDataAlgorithm.h
vtkGraphToGlyphs::SQUARE
@ SQUARE
Definition: vtkGraphToGlyphs.h:90
vtkGraphToGlyphs::New
static vtkGraphToGlyphs * New()
vtkGraphToGlyphs::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Convert the vtkGraph into vtkPolyData.
vtkGraphToGlyphs
create glyphs for graph vertices
Definition: vtkGraphToGlyphs.h:77
vtkGraphToPoints
convert a vtkGraph a set of points.
Definition: vtkGraphToPoints.h:38
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkGraphToGlyphs::GetMTime
vtkMTimeType GetMTime() override
The modified time of this filter.
vtkGraphToGlyphs::vtkGraphToGlyphs
vtkGraphToGlyphs()
vtkGraphToGlyphs::ScreenSize
double ScreenSize
Definition: vtkGraphToGlyphs.h:169
vtkGraphToGlyphs::GetRenderer
virtual vtkRenderer * GetRenderer()
The renderer in which the glyphs will be placed.
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:149
vtkGraphToGlyphs::DASH
@ DASH
Definition: vtkGraphToGlyphs.h:86
vtkGraphToGlyphs::THICKCROSS
@ THICKCROSS
Definition: vtkGraphToGlyphs.h:88
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkSmartPointer.h
vtkGraphToGlyphs::CIRCLE
@ CIRCLE
Definition: vtkGraphToGlyphs.h:91
vtkGraphToGlyphs::GlyphSource
vtkSmartPointer< vtkGlyphSource2D > GlyphSource
Definition: vtkGraphToGlyphs.h:163
vtkGlyph3D
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:216
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkDistanceToCamera
calculates distance from points to the camera.
Definition: vtkDistanceToCamera.h:60
vtkGraphToGlyphs::Sphere
vtkSmartPointer< vtkSphereSource > Sphere
Definition: vtkGraphToGlyphs.h:164
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:182
vtkGraphToGlyphs::Glyph
vtkSmartPointer< vtkGlyph3D > Glyph
Definition: vtkGraphToGlyphs.h:165
vtkGraphToGlyphs::~vtkGraphToGlyphs
~vtkGraphToGlyphs() override
vtkGraphToGlyphs::SetRenderer
virtual void SetRenderer(vtkRenderer *ren)
The renderer in which the glyphs will be placed.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkGraphToGlyphs::DIAMOND
@ DIAMOND
Definition: vtkGraphToGlyphs.h:92
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151