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

contrib/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 =========================================================================*/
00067 #ifndef __vtkCGMWriter_h
00068 #define __vtkCGMWriter_h
00069 
00070 #include "vtkPolyDataWriter.h"
00071 #include "vtkViewport.h"
00072 
00073 #define VTK_COLOR_MODE_DEFAULT 0
00074 #define VTK_COLOR_MODE_SPECIFIED_COLOR 1
00075 #define VTK_COLOR_MODE_RANDOM_COLORS 2
00076 
00077 class VTK_EXPORT vtkCGMWriter : public vtkPolyDataWriter
00078 {
00079 public:
00082   static vtkCGMWriter *New() {return new vtkCGMWriter;};
00083 
00084   vtkTypeMacro(vtkCGMWriter,vtkPolyDataWriter);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086 
00092   vtkSetObjectMacro(Viewport, vtkViewport);
00093   vtkGetObjectMacro(Viewport, vtkViewport);
00094 
00098   vtkSetMacro(Sort,int);
00099   vtkGetMacro(Sort,int);
00100 
00103   vtkSetClampMacro(Resolution, int, 100, VTK_LARGE_INTEGER);
00104   vtkGetMacro(Resolution, int);
00105 
00115   vtkSetMacro(ColorMode,int);
00116   vtkGetMacro(ColorMode,int);
00117   void SetColorModeToDefault() {
00118     this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00119   void SetColorModeToSpecifiedColor() {
00120     this->SetColorMode(VTK_COLOR_MODE_SPECIFIED_COLOR);};
00121   void SetColorModeToRandomColors() {
00122     this->SetColorMode(VTK_COLOR_MODE_RANDOM_COLORS);};
00123 
00129   vtkSetVector3Macro(SpecifiedColor,float);
00130   vtkGetVectorMacro(SpecifiedColor,float,3);
00131 
00132 protected:
00133   vtkCGMWriter();
00134   ~vtkCGMWriter();
00135   vtkCGMWriter(const vtkCGMWriter&) {};
00136   void operator=(const vtkCGMWriter&) {};
00137   void WriteData();
00138 
00139   vtkViewport *Viewport;
00140   int         ColorMode;
00141   float       SpecifiedColor[3];
00142   int         Resolution;
00143   int         Sort;
00144   
00145 };
00146 
00147 #endif
00148 

Generated on Wed Nov 21 12:26:55 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001