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

# IO/vtkSTLReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkSTLReader.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00058 #ifndef __vtkSTLReader_h
    00059 #define __vtkSTLReader_h
    00060
    00061 #include "vtkPolyDataSource.h"
    00062
    00063 class vtkCellArray;
    00064 class vtkFloatArray;
    00065 class vtkPointLocator;
    00066 class vtkPoints;
    00067
    00068 class VTK_IO_EXPORT vtkSTLReader : public vtkPolyDataSource
    00069 {
    00070 public:
    00071   vtkTypeRevisionMacro(vtkSTLReader,vtkPolyDataSource);
    00072   void PrintSelf(ostream& os, vtkIndent indent);
    00073
    00075   static vtkSTLReader *New();
    00076
    00079   unsigned long GetMTime();
    00080
    00082
    00083   vtkSetStringMacro(FileName);
    00084   vtkGetStringMacro(FileName);
    00086
    00088
    00089   vtkSetMacro(Merging,int);
    00090   vtkGetMacro(Merging,int);
    00091   vtkBooleanMacro(Merging,int);
    00093
    00095
    00096   vtkSetMacro(ScalarTags,int);
    00097   vtkGetMacro(ScalarTags,int);
    00098   vtkBooleanMacro(ScalarTags,int);
    00100
    00102
    00104   void SetLocator(vtkPointLocator *locator);
    00105   vtkGetObjectMacro(Locator,vtkPointLocator);
    00107
    00109   void CreateDefaultLocator();
    00110
    00111 protected:
    00112   vtkSTLReader();
    00113   ~vtkSTLReader();
    00114
    00115   char *FileName;
    00116   int Merging;
    00117   int ScalarTags;
    00118   vtkPointLocator *Locator;
    00119
    00120   void Execute();
    00121   int ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
    00122   int ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*,
    00123                    vtkFloatArray* scalars=0);
    00124   int GetSTLFileType(FILE *fp);
    00125 private:
    00126   vtkSTLReader(const vtkSTLReader&);  // Not implemented.
    00127   void operator=(const vtkSTLReader&);  // Not implemented.
    00128 };
    00129
    00130 #endif
    00131
    00132