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 "vtkPolyDataWriter.h"
44 
45 class vtkViewport;
46 
47 #define VTK_COLOR_MODE_DEFAULT 0
48 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
49 #define VTK_COLOR_MODE_RANDOM_COLORS 2
50 
52 {
53 public:
56  static vtkCGMWriter *New();
57 
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
67  virtual void SetViewport(vtkViewport*);
68  vtkGetObjectMacro(Viewport, vtkViewport);
70 
72 
75  vtkSetMacro(Sort,int);
76  vtkGetMacro(Sort,int);
78 
80 
82  vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
83  vtkGetMacro(Resolution, int);
85 
87 
96  vtkSetMacro(ColorMode,int);
97  vtkGetMacro(ColorMode,int);
99  this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
101  this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
103  this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
105 
107 
112  vtkSetVector3Macro(SpecifiedColor,float);
113  vtkGetVectorMacro(SpecifiedColor,float,3);
115 
116 protected:
117  vtkCGMWriter();
118  ~vtkCGMWriter();
119  void WriteData();
120 
123  float SpecifiedColor[3];
125  int Sort;
126 
127 private:
128  vtkCGMWriter(const vtkCGMWriter&); // Not implemented.
129  void operator=(const vtkCGMWriter&); // Not implemented.
130 };
131 
132 #endif
133 
write vtk polygonal data
void SetColorModeToDefault()
Definition: vtkCGMWriter.h:98
void SetColorModeToRandomColors()
Definition: vtkCGMWriter.h:102
abstract specification for Viewports
Definition: vtkViewport.h:45
#define VTK_COLOR_MODE_DEFAULT
Definition: vtkCGMWriter.h:47
void SetColorModeToSpecifiedColor()
Definition: vtkCGMWriter.h:100
vtkViewport * Viewport
Definition: vtkCGMWriter.h:121
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_COLOR_MODE_SPECIFIED_COLOR
Definition: vtkCGMWriter.h:48
static vtkPolyDataWriter * New()
#define VTK_COLOR_MODE_RANDOM_COLORS
Definition: vtkCGMWriter.h:49
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_IO_EXPORT
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
write polygonal data as a CGM file
Definition: vtkCGMWriter.h:51