VTK  9.2.6
vtkCGMWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCGMWriter.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 =========================================================================*/
41 #ifndef vtkCGMWriter_h
42 #define vtkCGMWriter_h
43 
44 #include "vtkIOGeometryModule.h" // For export macro
45 #include "vtkPolyDataWriter.h"
46 
47 class vtkViewport;
48 
49 #define VTK_COLOR_MODE_DEFAULT 0
50 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
51 #define VTK_COLOR_MODE_RANDOM_COLORS 2
52 
53 class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
54 {
55 public:
60  static vtkCGMWriter* New();
61 
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
66 
72  virtual void SetViewport(vtkViewport*);
73  vtkGetObjectMacro(Viewport, vtkViewport);
75 
77 
82  vtkSetMacro(Sort, int);
83  vtkGetMacro(Sort, int);
85 
87 
91  vtkSetClampMacro(Resolution, int, 100, VTK_INT_MAX);
92  vtkGetMacro(Resolution, int);
94 
96 
106  vtkSetMacro(ColorMode, int);
107  vtkGetMacro(ColorMode, int);
108  void SetColorModeToDefault() { this->SetColorMode(VTK_COLOR_MODE_DEFAULT); }
112 
114 
122  vtkSetVector3Macro(SpecifiedColor, float);
123  vtkGetVectorMacro(SpecifiedColor, float, 3);
125 
126 protected:
127  vtkCGMWriter();
128  ~vtkCGMWriter() override;
129  void WriteData();
130 
133  float SpecifiedColor[3];
135  int Sort;
136 
137 private:
138  vtkCGMWriter(const vtkCGMWriter&) = delete;
139  void operator=(const vtkCGMWriter&) = delete;
140 };
141 
142 #endif
write vtk polygonal data
void SetColorModeToDefault()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:108
void SetColorModeToRandomColors()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:110
abstract specification for Viewports
Definition: vtkViewport.h:55
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:49
void SetColorModeToSpecifiedColor()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:109
void Sort(RandomIt bitr, RandomIt eitr, BackToFront< T > &me)
vtkViewport * Viewport
Definition: vtkCGMWriter.h:131
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:50
static vtkPolyDataWriter * New()
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:51
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:53
void WriteData() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.