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 =========================================================================*/
37 #ifndef __vtkCGMWriter_h
38 #define __vtkCGMWriter_h
39 
40 #include "vtkIOGeometryModule.h" // For export macro
41 #include "vtkPolyDataWriter.h"
42 
43 class vtkViewport;
44 
45 #define VTK_COLOR_MODE_DEFAULT 0
46 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
47 #define VTK_COLOR_MODE_RANDOM_COLORS 2
48 
49 class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
50 {
51 public:
54  static vtkCGMWriter *New();
55 
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
65  virtual void SetViewport(vtkViewport*);
66  vtkGetObjectMacro(Viewport, vtkViewport);
68 
70 
73  vtkSetMacro(Sort,int);
74  vtkGetMacro(Sort,int);
76 
78 
80  vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
81  vtkGetMacro(Resolution, int);
83 
85 
94  vtkSetMacro(ColorMode,int);
95  vtkGetMacro(ColorMode,int);
97  this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
99  this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
101  this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
103 
105 
110  vtkSetVector3Macro(SpecifiedColor,float);
111  vtkGetVectorMacro(SpecifiedColor,float,3);
113 
114 protected:
115  vtkCGMWriter();
116  ~vtkCGMWriter();
117  void WriteData();
118 
121  float SpecifiedColor[3];
123  int Sort;
124 
125 private:
126  vtkCGMWriter(const vtkCGMWriter&); // Not implemented.
127  void operator=(const vtkCGMWriter&); // Not implemented.
128 };
129 
130 #endif
131