VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Geometry/vtkCGMWriter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCGMWriter.h
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 =========================================================================*/
00040 #ifndef vtkCGMWriter_h
00041 #define vtkCGMWriter_h
00042 
00043 #include "vtkIOGeometryModule.h" // For export macro
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 VTKIOGEOMETRY_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00053 {
00054 public:
00057   static vtkCGMWriter *New();
00058 
00059   vtkTypeMacro(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_INT_MAX);
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