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

IO/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 =========================================================================*/
00052 #ifndef __vtkCGMWriter_h
00053 #define __vtkCGMWriter_h
00054 
00055 #include "vtkPolyDataWriter.h"
00056 
00057 class vtkViewport;
00058 
00059 #define VTK_COLOR_MODE_DEFAULT 0
00060 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00061 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00062 
00063 class VTK_IO_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00064 {
00065 public:
00068   static vtkCGMWriter *New() {return new vtkCGMWriter;};
00069 
00070   vtkTypeRevisionMacro(vtkCGMWriter,vtkPolyDataWriter);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00074 
00079   virtual void SetViewport(vtkViewport*);
00080   vtkGetObjectMacro(Viewport, vtkViewport);
00082 
00084 
00087   vtkSetMacro(Sort,int);
00088   vtkGetMacro(Sort,int);
00090 
00092 
00094   vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00095   vtkGetMacro(Resolution, int);
00097 
00099 
00108   vtkSetMacro(ColorMode,int);
00109   vtkGetMacro(ColorMode,int);
00110   void SetColorModeToDefault() {
00111     this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00112   void SetColorModeToSpecifiedColor() {
00113     this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00114   void SetColorModeToRandomColors() {
00115     this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00117 
00119 
00124   vtkSetVector3Macro(SpecifiedColor,float);
00125   vtkGetVectorMacro(SpecifiedColor,float,3);
00127 
00128 protected:
00129   vtkCGMWriter();
00130   ~vtkCGMWriter();
00131   void WriteData();
00132 
00133   vtkViewport *Viewport;
00134   int         ColorMode;
00135   float       SpecifiedColor[3];
00136   int         Resolution;
00137   int         Sort;
00138   
00139 private:
00140   vtkCGMWriter(const vtkCGMWriter&);  // Not implemented.
00141   void operator=(const vtkCGMWriter&);  // Not implemented.
00142 };
00143 
00144 #endif
00145