Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00051 #ifndef __vtkCGMWriter_h
00052 #define __vtkCGMWriter_h
00053 
00054 #include "vtkPolyDataWriter.h"
00055 
00056 class vtkViewport;
00057 
00058 #define VTK_COLOR_MODE_DEFAULT 0
00059 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00060 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00061 
00062 class VTK_IO_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00063 {
00064 public:
00067   static vtkCGMWriter *New() {return new vtkCGMWriter;};
00068 
00069   vtkTypeRevisionMacro(vtkCGMWriter,vtkPolyDataWriter);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073 
00078   virtual void SetViewport(vtkViewport*);
00079   vtkGetObjectMacro(Viewport, vtkViewport);
00081 
00083 
00086   vtkSetMacro(Sort,int);
00087   vtkGetMacro(Sort,int);
00089 
00091 
00093   vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00094   vtkGetMacro(Resolution, int);
00096 
00098 
00107   vtkSetMacro(ColorMode,int);
00108   vtkGetMacro(ColorMode,int);
00109   void SetColorModeToDefault() {
00110     this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00111   void SetColorModeToSpecifiedColor() {
00112     this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00113   void SetColorModeToRandomColors() {
00114     this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00116 
00118 
00123   vtkSetVector3Macro(SpecifiedColor,float);
00124   vtkGetVectorMacro(SpecifiedColor,float,3);
00126 
00127 protected:
00128   vtkCGMWriter();
00129   ~vtkCGMWriter();
00130   void WriteData();
00131 
00132   vtkViewport *Viewport;
00133   int         ColorMode;
00134   float       SpecifiedColor[3];
00135   int         Resolution;
00136   int         Sort;
00137   
00138 private:
00139   vtkCGMWriter(const vtkCGMWriter&);  // Not implemented.
00140   void operator=(const vtkCGMWriter&);  // Not implemented.
00141 };
00142 
00143 #endif
00144