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   Credit:    The origin of much of this code was from the cd package
00007              written by G. Edward Johnson at the National Institute 
00008              of Standards and Technology (US).
00009 
00010 
00011 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00012 All rights reserved.
00013 
00014 Redistribution and use in source and binary forms, with or without
00015 modification, are permitted provided that the following conditions are met:
00016 
00017  * Redistributions of source code must retain the above copyright notice,
00018    this list of conditions and the following disclaimer.
00019 
00020  * Redistributions in binary form must reproduce the above copyright notice,
00021    this list of conditions and the following disclaimer in the documentation
00022    and/or other materials provided with the distribution.
00023 
00024  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00025    of any contributors may be used to endorse or promote products derived
00026    from this software without specific prior written permission.
00027 
00028  * Modified source versions must be plainly marked as such, and must not be
00029    misrepresented as being the original software.
00030 
00031 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00032 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00033 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00034 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00035 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00036 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00037 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00038 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00039 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00040 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00041 
00042 =========================================================================*/
00068 #ifndef __vtkCGMWriter_h
00069 #define __vtkCGMWriter_h
00070 
00071 #include "vtkPolyDataWriter.h"
00072 #include "vtkViewport.h"
00073 
00074 #define VTK_COLOR_MODE_DEFAULT 0
00075 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00076 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00077 
00078 class VTK_IO_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00079 {
00080 public:
00083   static vtkCGMWriter *New() {return new vtkCGMWriter;};
00084 
00085   vtkTypeMacro(vtkCGMWriter,vtkPolyDataWriter);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087 
00089 
00094   vtkSetObjectMacro(Viewport, vtkViewport);
00095   vtkGetObjectMacro(Viewport, vtkViewport);
00097 
00099 
00102   vtkSetMacro(Sort,int);
00103   vtkGetMacro(Sort,int);
00105 
00107 
00109   vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00110   vtkGetMacro(Resolution, int);
00112 
00114 
00123   vtkSetMacro(ColorMode,int);
00124   vtkGetMacro(ColorMode,int);
00125   void SetColorModeToDefault() {
00126     this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00127   void SetColorModeToSpecifiedColor() {
00128     this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00129   void SetColorModeToRandomColors() {
00130     this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00132 
00134 
00139   vtkSetVector3Macro(SpecifiedColor,float);
00140   vtkGetVectorMacro(SpecifiedColor,float,3);
00142 
00143 protected:
00144   vtkCGMWriter();
00145   ~vtkCGMWriter();
00146   void WriteData();
00147 
00148   vtkViewport *Viewport;
00149   int         ColorMode;
00150   float       SpecifiedColor[3];
00151   int         Resolution;
00152   int         Sort;
00153   
00154 private:
00155   vtkCGMWriter(const vtkCGMWriter&);  // Not implemented.
00156   void operator=(const vtkCGMWriter&);  // Not implemented.
00157 };
00158 
00159 #endif
00160 

Generated on Thu Mar 28 14:19:28 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001