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 =========================================================================*/
41 #ifndef vtkCGMWriter_h
42 #define vtkCGMWriter_h
43 
44 #include "vtkIOGeometryModule.h" // For export macro
45 #include "vtkPolyDataWriter.h"
46 
47 class 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 
53 class VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
54 {
55 public:
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);
109  this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
111  this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
113  this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
115 
117 
125  vtkSetVector3Macro(SpecifiedColor,float);
126  vtkGetVectorMacro(SpecifiedColor,float,3);
128 
129 protected:
130  vtkCGMWriter();
131  ~vtkCGMWriter();
132  void WriteData();
133 
136  float SpecifiedColor[3];
138  int Sort;
139 
140 private:
141  vtkCGMWriter(const vtkCGMWriter&) VTK_DELETE_FUNCTION;
142  void operator=(const vtkCGMWriter&) VTK_DELETE_FUNCTION;
143 };
144 
145 #endif
146 
write vtk polygonal data
void SetColorModeToDefault()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:108
void SetColorModeToRandomColors()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:112
abstract specification for Viewports
Definition: vtkViewport.h:47
#define VTK_INT_MAX
Definition: vtkType.h:153
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:49
void SetColorModeToSpecifiedColor()
Control how output polydata is colored.
Definition: vtkCGMWriter.h:110
vtkViewport * Viewport
Definition: vtkCGMWriter.h:134
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:50
static vtkPolyDataWriter * New()
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:51
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:53