VTK
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);
106  this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
108  this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
110  this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
112 
114 
122  vtkSetVector3Macro(SpecifiedColor,float);
123  vtkGetVectorMacro(SpecifiedColor,float,3);
125 
126 protected:
127  vtkCGMWriter();
128  ~vtkCGMWriter();
129  void WriteData();
130 
133  float SpecifiedColor[3];
135  int Sort;
136 
137 private:
138  vtkCGMWriter(const vtkCGMWriter&) VTK_DELETE_FUNCTION;
139  void operator=(const vtkCGMWriter&) VTK_DELETE_FUNCTION;
140 };
141 
142 #endif
143 
write vtk polygonal data
void SetColorModeToDefault()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:105
void SetColorModeToRandomColors()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:109
abstract specification for Viewports
Definition: vtkViewport.h:44
#define VTK_INT_MAX
Definition: vtkType.h:157
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:46
void SetColorModeToSpecifiedColor()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:107
vtkViewport * Viewport
Definition: vtkCGMWriter.h:131
a simple class to control print indentation
Definition: vtkIndent.h:33
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:47
static vtkPolyDataWriter * New()
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:48
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:50
void WriteData() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.