VTK
vtkVRMLImporter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkVRMLImporter.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
57#ifndef vtkVRMLImporter_h
58#define vtkVRMLImporter_h
59
60#include "vtkIOImportModule.h" // For export macro
61#include "vtkImporter.h"
62
63class vtkActor;
64class vtkAlgorithm;
65class vtkProperty;
66class vtkLight;
67class vtkTransform;
68class vtkLookupTable;
69class vtkFloatArray;
71class vtkPoints;
72class vtkIdTypeArray;
73class vtkVRMLImporterInternal;
74class vtkVRMLYaccData;
75class vtkCellArray;
76
77class VTKIOIMPORT_EXPORT vtkVRMLImporter : public vtkImporter
78{
79public:
81
83 void PrintSelf(ostream& os, vtkIndent indent);
84
86
89 vtkSetStringMacro(FileName);
92
94
98 vtkSetMacro(ShapeResolution, int);
99 vtkGetMacro(ShapeResolution, int);
101
111
112protected:
115
117 virtual int ImportBegin();
118 virtual void ImportEnd();
119 virtual void ImportActors(vtkRenderer*) {}
120 virtual void ImportCameras(vtkRenderer*) {}
121 virtual void ImportLights(vtkRenderer*) {}
123
125
128 virtual void enterNode(const char*);
129 virtual void exitNode();
130 virtual void enterField(const char*);
131 virtual void exitField();
132 virtual void useNode(const char*);
134
138 FILE *GetFileFD() { return this->FileFD; }
139
140 char *FileName;
141 FILE *FileFD;
143
144 friend class vtkVRMLYaccData;
145
146private:
147 vtkPoints* PointsNew();
148 vtkFloatArray* FloatArrayNew();
149 vtkIdTypeArray* IdTypeArrayNew();
150
151 void DeleteObject(vtkObject*);
152
153 vtkVRMLImporterInternal* Internal;
154 vtkVRMLYaccData* Parser;
155 vtkActor* CurrentActor;
156 vtkProperty* CurrentProperty;
157 vtkLight* CurrentLight;
158 vtkTransform* CurrentTransform;
159 vtkAlgorithm* CurrentSource;
160 vtkPoints* CurrentPoints;
161 vtkFloatArray* CurrentNormals;
162 vtkCellArray* CurrentNormalCells;
163 vtkFloatArray* CurrentTCoords;
164 vtkCellArray* CurrentTCoordCells;
165 vtkLookupTable* CurrentLut;
166 vtkFloatArray* CurrentScalars;
167 vtkPolyDataMapper* CurrentMapper;
168
169private:
170 vtkVRMLImporter(const vtkVRMLImporter&) VTK_DELETE_FUNCTION;
171 void operator=(const vtkVRMLImporter&) VTK_DELETE_FUNCTION;
172};
173
174#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
object to represent cell connectivity
Definition: vtkCellArray.h:51
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
dynamic, self-adjusting array of vtkIdType
importer abstract class
Definition: vtkImporter.h:55
a simple class to control print indentation
Definition: vtkIndent.h:40
a virtual light for 3D rendering
Definition: vtkLight.h:62
map scalar values into colors via a lookup table
abstract base class for most VTK objects
Definition: vtkObject.h:60
represent and manipulate 3D points
Definition: vtkPoints.h:40
map vtkPolyData to graphics primitives
represent surface properties of a geometric object
Definition: vtkProperty.h:65
abstract specification for renderers
Definition: vtkRenderer.h:64
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
imports VRML 2.0 files.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void ImportProperties(vtkRenderer *)
virtual void ImportCameras(vtkRenderer *)
virtual void useNode(const char *)
virtual int ImportBegin()
virtual void exitNode()
virtual void ImportActors(vtkRenderer *)
vtkObject * GetVRMLDEFObject(const char *name)
In the VRML spec you can DEF and USE nodes (name them), This routine will return the associated VTK o...
virtual void enterField(const char *)
FILE * GetFileFD()
Return the file pointer to the open file.
virtual void ImportEnd()
virtual void enterNode(const char *)
Needed by the yacc/lex grammar used.
static vtkVRMLImporter * New()
virtual void ImportLights(vtkRenderer *)
virtual void exitField()
@ name
Definition: vtkX3D.h:219
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.