00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00054
#ifndef __vtkVRMLImporter_h
00055
#define __vtkVRMLImporter_h
00056
00057
00058
#include "vtkImporter.h"
00059
00060
class vtkActor;
00061
class vtkProperty;
00062
class vtkCamera;
00063
class vtkLight;
00064
class vtkTransform;
00065
class vtkSource;
00066
class vtkLookupTable;
00067
class vtkFloatArray;
00068
class vtkPolyDataMapper;
00069
class vtkPoints;
00070
class vtkIdTypeArray;
00071
class vtkVRMLImporterInternal;
00072
00073 class VTK_HYBRID_EXPORT vtkVRMLImporter :
public vtkImporter
00074 {
00075
public:
00076
static vtkVRMLImporter *
New();
00077
00078 vtkTypeRevisionMacro(vtkVRMLImporter,
vtkImporter);
00079
void PrintSelf(ostream& os,
vtkIndent indent);
00080
00086
vtkObject *GetVRMLDEFObject(
const char *name);
00087
00089
00090
void enterNode(
const char *);
00091
void exitNode();
00092
void enterField(
const char *);
00093
void exitField();
00094
void useNode(
const char *);
00096
00098
00099 vtkSetStringMacro(FileName);
00100 vtkGetStringMacro(FileName);
00102
00104 FILE *GetFileFD() {
return this->FileFD;};
00105
00106
00107
00108
friend int yylex ( vtkVRMLImporter* );
00109
00110
00111
00112
protected:
00113 vtkVRMLImporter();
00114 ~vtkVRMLImporter();
00115
00116
virtual int ImportBegin ();
00117
virtual void ImportEnd ();
00118 virtual void ImportActors (
vtkRenderer *) {};
00119 virtual void ImportCameras (
vtkRenderer *) {};
00120 virtual void ImportLights (
vtkRenderer *) {};
00121 virtual void ImportProperties (
vtkRenderer *) {};
00122
00123
int OpenImportFile();
00124 char *FileName;
00125 FILE *FileFD;
00126
00127
private:
00128
vtkActor *CurrentActor;
00129
vtkProperty *CurrentProperty;
00130
vtkCamera *CurrentCamera;
00131
vtkLight *CurrentLight;
00132
vtkTransform *CurrentTransform;
00133
vtkSource *CurrentSource;
00134
vtkPoints *CurrentPoints;
00135
vtkFloatArray *CurrentNormals;
00136
vtkLookupTable *CurrentLut;
00137
vtkFloatArray *CurrentScalars;
00138
vtkPolyDataMapper *CurrentMapper;
00139
00140
vtkPoints* PointsNew();
00141
vtkIdTypeArray* IdTypeArrayNew();
00142
00143
void DeleteObject(
vtkObject*);
00144
00145 vtkVRMLImporterInternal* Internal;
00146
00147
private:
00148 vtkVRMLImporter(
const vtkVRMLImporter&);
00149
void operator=(
const vtkVRMLImporter&);
00150 };
00151
00152
#endif
00153