VTK  9.0.1
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 
44 class 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 
50 class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
51 {
52 public:
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 
123 protected:
124  vtkCGMWriter();
125  ~vtkCGMWriter() override;
126  void WriteData();
127 
130  float SpecifiedColor[3];
132  int Sort;
133 
134 private:
135  vtkCGMWriter(const vtkCGMWriter&) = delete;
136  void operator=(const vtkCGMWriter&) = delete;
137 };
138 
139 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkPolyDataWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_COLOR_MODE_SPECIFIED_COLOR
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:47
VTK_COLOR_MODE_DEFAULT
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:46
vtkCGMWriter::SetColorModeToDefault
void SetColorModeToDefault()
Definition: vtkCGMWriter.h:105
vtkCGMWriter::SetColorModeToRandomColors
void SetColorModeToRandomColors()
Definition: vtkCGMWriter.h:107
vtkPolyDataWriter::New
static vtkPolyDataWriter * New()
VTK_COLOR_MODE_RANDOM_COLORS
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:48
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCGMWriter::Viewport
vtkViewport * Viewport
Definition: vtkCGMWriter.h:128
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkCGMWriter
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:50
vtkCGMWriter::Sort
int Sort
Definition: vtkCGMWriter.h:132
vtkPolyDataWriter::WriteData
void WriteData() override
vtkCGMWriter::SetColorModeToSpecifiedColor
void SetColorModeToSpecifiedColor()
Definition: vtkCGMWriter.h:106
vtkPolyDataWriter
write vtk polygonal data
Definition: vtkPolyDataWriter.h:33
vtkCGMWriter::ColorMode
int ColorMode
Definition: vtkCGMWriter.h:129
vtkPolyDataWriter.h
vtkCGMWriter::Resolution
int Resolution
Definition: vtkCGMWriter.h:131