Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkCGMWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCGMWriter.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00041 #ifndef __vtkCGMWriter_h
00042 #define __vtkCGMWriter_h
00043 
00044 #include "vtkPolyDataWriter.h"
00045 
00046 class vtkViewport;
00047 
00048 #define VTK_COLOR_MODE_DEFAULT 0
00049 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00050 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00051 
00052 class VTK_IO_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00053 {
00054 public:
00057   static vtkCGMWriter *New() {return new vtkCGMWriter;};
00058 
00059   vtkTypeRevisionMacro(vtkCGMWriter,vtkPolyDataWriter);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00063 
00068   virtual void SetViewport(vtkViewport*);
00069   vtkGetObjectMacro(Viewport, vtkViewport);
00071 
00073 
00076   vtkSetMacro(Sort,int);
00077   vtkGetMacro(Sort,int);
00079 
00081 
00083   vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00084   vtkGetMacro(Resolution, int);
00086 
00088 
00097   vtkSetMacro(ColorMode,int);
00098   vtkGetMacro(ColorMode,int);
00099   void SetColorModeToDefault() {
00100     this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00101   void SetColorModeToSpecifiedColor() {
00102     this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00103   void SetColorModeToRandomColors() {
00104     this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00106 
00108 
00113   vtkSetVector3Macro(SpecifiedColor,float);
00114   vtkGetVectorMacro(SpecifiedColor,float,3);
00116 
00117 protected:
00118   vtkCGMWriter();
00119   ~vtkCGMWriter();
00120   void WriteData();
00121 
00122   vtkViewport *Viewport;
00123   int         ColorMode;
00124   float       SpecifiedColor[3];
00125   int         Resolution;
00126   int         Sort;
00127   
00128 private:
00129   vtkCGMWriter(const vtkCGMWriter&);  // Not implemented.
00130   void operator=(const vtkCGMWriter&);  // Not implemented.
00131 };
00132 
00133 #endif
00134