Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkSTLReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSTLReader.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 =========================================================================*/
00040 #ifndef __vtkSTLReader_h
00041 #define __vtkSTLReader_h
00042 
00043 #include "vtkPolyDataAlgorithm.h"
00044 
00045 class vtkCellArray;
00046 class vtkFloatArray;
00047 class vtkPointLocator;
00048 class vtkPoints;
00049 
00050 class VTK_IO_EXPORT vtkSTLReader : public vtkPolyDataAlgorithm 
00051 {
00052 public:
00053   vtkTypeRevisionMacro(vtkSTLReader,vtkPolyDataAlgorithm);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057   static vtkSTLReader *New();
00058 
00061   unsigned long GetMTime();
00062 
00064 
00065   vtkSetStringMacro(FileName);
00066   vtkGetStringMacro(FileName);
00068 
00070 
00071   vtkSetMacro(Merging,int);
00072   vtkGetMacro(Merging,int);
00073   vtkBooleanMacro(Merging,int);
00075 
00077 
00078   vtkSetMacro(ScalarTags,int);
00079   vtkGetMacro(ScalarTags,int);
00080   vtkBooleanMacro(ScalarTags,int);
00082 
00084 
00086   void SetLocator(vtkPointLocator *locator);
00087   vtkGetObjectMacro(Locator,vtkPointLocator);
00089 
00091   void CreateDefaultLocator();
00092 
00093 protected:
00094   vtkSTLReader();
00095   ~vtkSTLReader();
00096 
00097   char *FileName;
00098   int Merging;
00099   int ScalarTags;
00100   vtkPointLocator *Locator;
00101 
00102   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00103   int ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
00104   int ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*, 
00105                    vtkFloatArray* scalars=0);
00106   int GetSTLFileType(FILE *fp);
00107 private:
00108   vtkSTLReader(const vtkSTLReader&);  // Not implemented.
00109   void operator=(const vtkSTLReader&);  // Not implemented.
00110 };
00111 
00112 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530