VTK  9.1.0
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=========================================================================*/
38#ifndef vtkCGMWriter_h
39#define vtkCGMWriter_h
40
41#include "vtkIOGeometryModule.h" // For export macro
42#include "vtkPolyDataWriter.h"
43
44class vtkViewport;
45
46#define VTK_COLOR_MODE_DEFAULT 0
47#define VTK_COLOR_MODE_SPECIFIED_COLOR 1
48#define VTK_COLOR_MODE_RANDOM_COLORS 2
49
50class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
51{
52public:
57 static vtkCGMWriter* New();
58
60 void PrintSelf(ostream& os, vtkIndent indent);
61
63
69 virtual void SetViewport(vtkViewport*);
70 vtkGetObjectMacro(Viewport, vtkViewport);
72
74
79 vtkSetMacro(Sort, int);
80 vtkGetMacro(Sort, int);
82
84
88 vtkSetClampMacro(Resolution, int, 100, VTK_INT_MAX);
89 vtkGetMacro(Resolution, int);
91
93
103 vtkSetMacro(ColorMode, int);
104 vtkGetMacro(ColorMode, int);
105 void SetColorModeToDefault() { this->SetColorMode(VTK_COLOR_MODE_DEFAULT); }
109
111
119 vtkSetVector3Macro(SpecifiedColor, float);
120 vtkGetVectorMacro(SpecifiedColor, float, 3);
122
123protected:
125 ~vtkCGMWriter() override;
126 void WriteData();
127
130 float SpecifiedColor[3];
132 int Sort;
133
134private:
135 vtkCGMWriter(const vtkCGMWriter&) = delete;
136 void operator=(const vtkCGMWriter&) = delete;
137};
138
139#endif
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:51
~vtkCGMWriter() override
void SetColorModeToDefault()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:105
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetColorModeToSpecifiedColor()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:106
void WriteData()
vtkViewport * Viewport
Definition: vtkCGMWriter.h:128
static vtkCGMWriter * New()
Instantiate with no viewport defined and sorting on.
virtual void SetViewport(vtkViewport *)
Specify a vtkViewport object to be used to transform the vtkPolyData points into 2D coordinates.
void SetColorModeToRandomColors()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:107
a simple class to control print indentation
Definition: vtkIndent.h:113
write vtk polygonal data
abstract specification for Viewports
Definition: vtkViewport.h:47
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:47
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:48
#define VTK_COLOR_MODE_DEFAULT
#define VTK_INT_MAX
Definition: vtkType.h:155