VTK  9.2.6
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=========================================================================*/
136#ifndef vtkVRMLImporter_h
137#define vtkVRMLImporter_h
138
139#include "vtkIOImportModule.h" // For export macro
140#include "vtkImporter.h"
141
142class vtkActor;
143class vtkAlgorithm;
144class vtkProperty;
145class vtkLight;
146class vtkTransform;
147class vtkLookupTable;
148class vtkFloatArray;
150class vtkPoints;
151class vtkIdTypeArray;
152class vtkVRMLImporterInternal;
153class vtkVRMLYaccData;
154class vtkCellArray;
155
156class VTKIOIMPORT_EXPORT vtkVRMLImporter : public vtkImporter
157{
158public:
160
162 void PrintSelf(ostream& os, vtkIndent indent) override;
163
165
171
173
177 vtkSetMacro(ShapeResolution, int);
178 vtkGetMacro(ShapeResolution, int);
180
190
195
196protected:
199
201 int ImportBegin() override;
202 void ImportEnd() override;
203 void ImportActors(vtkRenderer*) override {}
204 void ImportCameras(vtkRenderer*) override {}
205 void ImportLights(vtkRenderer*) override {}
206 void ImportProperties(vtkRenderer*) override {}
207
209
212 virtual void enterNode(const char*);
213 virtual void exitNode();
214 virtual void enterField(const char*);
215 virtual void exitField();
216 virtual void useNode(const char*);
218
222 FILE* GetFileFD() { return this->FileFD; }
223
224 char* FileName;
225 FILE* FileFD;
227
228 friend class vtkVRMLYaccData;
229
230private:
231 vtkPoints* PointsNew();
232 vtkFloatArray* FloatArrayNew();
233 vtkIdTypeArray* IdTypeArrayNew();
234
235 void DeleteObject(vtkObject*);
236
237 vtkVRMLImporterInternal* Internal;
238 vtkVRMLYaccData* Parser;
239 vtkActor* CurrentActor;
240 vtkProperty* CurrentProperty;
241 vtkLight* CurrentLight;
242 vtkTransform* CurrentTransform;
243 vtkAlgorithm* CurrentSource;
244 vtkPoints* CurrentPoints;
245 vtkFloatArray* CurrentNormals;
246 vtkCellArray* CurrentNormalCells;
247 vtkFloatArray* CurrentTCoords;
248 vtkCellArray* CurrentTCoordCells;
249 vtkLookupTable* CurrentLut;
250 vtkFloatArray* CurrentScalars;
251 vtkPolyDataMapper* CurrentMapper;
252
253private:
254 vtkVRMLImporter(const vtkVRMLImporter&) = delete;
255 void operator=(const vtkVRMLImporter&) = delete;
256};
257
258#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:161
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:122
object to represent cell connectivity
Definition: vtkCellArray.h:296
dynamic, self-adjusting array of float
dynamic, self-adjusting array of vtkIdType
importer abstract class
Definition: vtkImporter.h:60
a simple class to control print indentation
Definition: vtkIndent.h:119
a virtual light for 3D rendering
Definition: vtkLight.h:169
map scalar values into colors via a lookup table
abstract base class for most VTK objects
Definition: vtkObject.h:82
represent and manipulate 3D points
Definition: vtkPoints.h:149
map vtkPolyData to graphics primitives
represent surface properties of a geometric object
Definition: vtkProperty.h:177
abstract specification for renderers
Definition: vtkRenderer.h:182
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:170
imports VRML 2.0 files.
void ImportLights(vtkRenderer *) override
void ImportCameras(vtkRenderer *) override
void ImportActors(vtkRenderer *) override
virtual void useNode(const char *)
Needed by the yacc/lex grammar used.
virtual void exitNode()
Needed by the yacc/lex grammar used.
~vtkVRMLImporter() override
vtkSetFilePathMacro(FileName)
Specify the name of the file to read.
std::string GetOutputsDescription() override
Get a printable string describing the outputs.
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...
void ImportEnd() override
virtual void enterField(const char *)
Needed by the yacc/lex grammar used.
FILE * GetFileFD()
Return the file pointer to the open file.
void ImportProperties(vtkRenderer *) override
vtkGetFilePathMacro(FileName)
Specify the name of the file to read.
virtual void enterNode(const char *)
Needed by the yacc/lex grammar used.
int ImportBegin() override
static vtkVRMLImporter * New()
virtual void exitField()
Needed by the yacc/lex grammar used.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
@ name
Definition: vtkX3D.h:225
@ string
Definition: vtkX3D.h:496