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=========================================================================*/
40
41#ifndef vtkCGMWriter_h
42#define vtkCGMWriter_h
43
44#include "vtkIOGeometryModule.h" // For export macro
45#include "vtkPolyDataWriter.h"
46
47class 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
53class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
54{
55public:
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);
112
114
122 vtkSetVector3Macro(SpecifiedColor, float);
123 vtkGetVectorMacro(SpecifiedColor, float, 3);
125
126protected:
128 ~vtkCGMWriter() override;
129 void WriteData();
130
135 int Sort;
136
137private:
138 vtkCGMWriter(const vtkCGMWriter&) = delete;
139 void operator=(const vtkCGMWriter&) = delete;
140};
141
142#endif
~vtkCGMWriter() override
void SetColorModeToDefault()
Control how output polydata is colored.
float SpecifiedColor[3]
virtual void SetColorMode(int)
Control how output polydata is colored.
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.
void WriteData()
vtkViewport * Viewport
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.
a simple class to control print indentation
Definition vtkIndent.h:40
vtkPolyDataWriter()=default
abstract specification for Viewports
Definition vtkViewport.h:56
#define VTK_COLOR_MODE_DEFAULT
#define VTK_COLOR_MODE_SPECIFIED_COLOR
#define VTK_COLOR_MODE_RANDOM_COLORS
#define VTK_INT_MAX
Definition vtkType.h:155