00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00040 #ifndef __vtkCGMWriter_h
00041 #define __vtkCGMWriter_h
00042
00043 #include "vtkPolyDataWriter.h"
00044
00045 class vtkViewport;
00046
00047 #define VTK_COLOR_MODE_DEFAULT 0
00048 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00049 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00050
00051 class VTK_IO_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00052 {
00053 public:
00056 static vtkCGMWriter *New();
00057
00058 vtkTypeMacro(vtkCGMWriter,vtkPolyDataWriter);
00059 void PrintSelf(ostream& os, vtkIndent indent);
00060
00062
00067 virtual void SetViewport(vtkViewport*);
00068 vtkGetObjectMacro(Viewport, vtkViewport);
00070
00072
00075 vtkSetMacro(Sort,int);
00076 vtkGetMacro(Sort,int);
00078
00080
00082 vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00083 vtkGetMacro(Resolution, int);
00085
00087
00096 vtkSetMacro(ColorMode,int);
00097 vtkGetMacro(ColorMode,int);
00098 void SetColorModeToDefault() {
00099 this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00100 void SetColorModeToSpecifiedColor() {
00101 this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00102 void SetColorModeToRandomColors() {
00103 this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00105
00107
00112 vtkSetVector3Macro(SpecifiedColor,float);
00113 vtkGetVectorMacro(SpecifiedColor,float,3);
00115
00116 protected:
00117 vtkCGMWriter();
00118 ~vtkCGMWriter();
00119 void WriteData();
00120
00121 vtkViewport *Viewport;
00122 int ColorMode;
00123 float SpecifiedColor[3];
00124 int Resolution;
00125 int Sort;
00126
00127 private:
00128 vtkCGMWriter(const vtkCGMWriter&);
00129 void operator=(const vtkCGMWriter&);
00130 };
00131
00132 #endif
00133