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 =========================================================================*/
40 #ifndef vtkCGMWriter_h
41 #define vtkCGMWriter_h
42 
43 #include "vtkIOGeometryModule.h" // For export macro
44 #include "vtkPolyDataWriter.h"
45 
46 class vtkViewport;
47 
48 #define VTK_COLOR_MODE_DEFAULT 0
49 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
50 #define VTK_COLOR_MODE_RANDOM_COLORS 2
51 
53 {
54 public:
57  static vtkCGMWriter *New();
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
68  virtual void SetViewport(vtkViewport*);
69  vtkGetObjectMacro(Viewport, vtkViewport);
71 
73 
76  vtkSetMacro(Sort,int);
77  vtkGetMacro(Sort,int);
79 
81 
83  vtkSetClampMacro(Resolution, int, 100, VTK_INT_MAX);
84  vtkGetMacro(Resolution, int);
86 
88 
97  vtkSetMacro(ColorMode,int);
98  vtkGetMacro(ColorMode,int);
100  this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
102  this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
104  this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
106 
108 
113  vtkSetVector3Macro(SpecifiedColor,float);
114  vtkGetVectorMacro(SpecifiedColor,float,3);
116 
117 protected:
118  vtkCGMWriter();
119  ~vtkCGMWriter();
120  void WriteData();
121 
124  float SpecifiedColor[3];
126  int Sort;
127 
128 private:
129  vtkCGMWriter(const vtkCGMWriter&); // Not implemented.
130  void operator=(const vtkCGMWriter&); // Not implemented.
131 };
132 
133 #endif
134 
write vtk polygonal data
void SetColorModeToDefault()
Definition: vtkCGMWriter.h:99
void SetColorModeToRandomColors()
Definition: vtkCGMWriter.h:103
abstract specification for Viewports
Definition: vtkViewport.h:46
#define VTK_INT_MAX
Definition: vtkType.h:130
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:48
void SetColorModeToSpecifiedColor()
Definition: vtkCGMWriter.h:101
#define VTKIOGEOMETRY_EXPORT
vtkViewport * Viewport
Definition: vtkCGMWriter.h:122
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:49
static vtkPolyDataWriter * New()
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:50
void PrintSelf(ostream &os, vtkIndent indent)
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:52