Hybrid/vtkVRMLImporter.h Source File

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

# Hybrid/vtkVRMLImporter.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkVRMLImporter.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 =========================================================================*/
    00066 #ifndef __vtkVRMLImporter_h
    00067 #define __vtkVRMLImporter_h
    00068
    00069 // Includes for the yacc/lex parser
    00070 #include "vtkImporter.h"
    00071
    00072 class vtkActor;
    00073 class vtkProperty;
    00074 class vtkCamera;
    00075 class vtkLight;
    00076 class vtkTransform;
    00077 class vtkSource;
    00078 class vtkLookupTable;
    00079 class vtkFloatArray;
    00080 class vtkPolyDataMapper;
    00081 class vtkPoints;
    00082 class vtkIdTypeArray;
    00083 class vtkVRMLImporterInternal;
    00084
    00085 class VTK_HYBRID_EXPORT vtkVRMLImporter : public vtkImporter
    00086 {
    00087 public:
    00088   static vtkVRMLImporter *New();
    00089
    00090   vtkTypeRevisionMacro(vtkVRMLImporter,vtkImporter);
    00091   void PrintSelf(ostream& os, vtkIndent indent);
    00092
    00098   vtkObject *GetVRMLDEFObject(const char *name);
    00099
    00101
    00102   void enterNode(const char *);
    00103   void exitNode();
    00104   void enterField(const char *);
    00105   void exitField();
    00106   void useNode(const char *);
    00108
    00110
    00111   vtkSetStringMacro(FileName);
    00112   vtkGetStringMacro(FileName);
    00114
    00116   FILE *GetFileFD() {return this->FileFD;};
    00117
    00118 //BTX
    00119
    00120   friend int yylex ( vtkVRMLImporter* );
    00121
    00122 //ETX
    00123
    00124 protected:
    00125   vtkVRMLImporter();
    00126   ~vtkVRMLImporter();
    00127
    00128   virtual int ImportBegin ();
    00129   virtual void ImportEnd ();
    00130   virtual void ImportActors (vtkRenderer *) {};
    00131   virtual void ImportCameras (vtkRenderer *) {};
    00132   virtual void ImportLights (vtkRenderer *) {};
    00133   virtual void ImportProperties (vtkRenderer *) {};
    00134
    00135   int OpenImportFile();
    00136   char *FileName;
    00137   FILE *FileFD;
    00138
    00139 private:
    00140   vtkActor             *CurrentActor;
    00141   vtkProperty          *CurrentProperty;
    00142   vtkCamera            *CurrentCamera;
    00143   vtkLight             *CurrentLight;
    00144   vtkTransform         *CurrentTransform;
    00145   vtkSource            *CurrentSource;
    00146   vtkPoints            *CurrentPoints;
    00147   vtkFloatArray         *CurrentNormals;
    00148   vtkLookupTable       *CurrentLut;
    00149   vtkFloatArray        *CurrentScalars;
    00150   vtkPolyDataMapper    *CurrentMapper;
    00151
    00152   vtkPoints* PointsNew();
    00153   vtkIdTypeArray* IdTypeArrayNew();
    00154
    00155   void DeleteObject(vtkObject*);
    00156
    00157   vtkVRMLImporterInternal* Internal;
    00158
    00159 private:
    00160   vtkVRMLImporter(const vtkVRMLImporter&);  // Not implemented.
    00161   void operator=(const vtkVRMLImporter&);  // Not implemented.
    00162 };
    00163
    00164 #endif
    00165