Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
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();
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