VTK  9.5.20251015
vtkVRMLImporter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
129#ifndef vtkVRMLImporter_h
130#define vtkVRMLImporter_h
131
132#include "vtkIOImportModule.h" // For export macro
133#include "vtkImporter.h"
134
135VTK_ABI_NAMESPACE_BEGIN
136class vtkActor;
137class vtkAlgorithm;
138class vtkProperty;
139class vtkLight;
140class vtkTransform;
141class vtkLookupTable;
142class vtkFloatArray;
144class vtkPoints;
145class vtkIdTypeArray;
146class vtkVRMLImporterInternal;
147class vtkVRMLYaccData;
148class vtkCellArray;
149
150class VTKIOIMPORT_EXPORT vtkVRMLImporter : public vtkImporter
151{
152public:
154
156 void PrintSelf(ostream& os, vtkIndent indent) override;
157
159
163 vtkSetMacro(ShapeResolution, int);
164 vtkGetMacro(ShapeResolution, int);
166
175 vtkObject* GetVRMLDEFObject(const char* name);
176
180 std::string GetOutputsDescription() override;
181
182protected:
185
187 int ImportBegin() override;
188 void ImportEnd() override;
189 void ImportActors(vtkRenderer*) override {}
190 void ImportCameras(vtkRenderer*) override {}
191 void ImportLights(vtkRenderer*) override {}
192 void ImportProperties(vtkRenderer*) override {}
193
195
198 virtual void enterNode(const char*);
199 virtual void exitNode();
200 virtual void enterField(const char*);
201 virtual void exitField();
202 virtual void useNode(const char*);
204
208 FILE* GetFileFD() { return this->FileFD; }
209
210 FILE* FileFD;
212
213 friend class vtkVRMLYaccData;
214
215private:
216 vtkPoints* PointsNew();
217 vtkFloatArray* FloatArrayNew();
218 vtkIdTypeArray* IdTypeArrayNew();
219
220 void DeleteObject(vtkObject*);
221
222 vtkVRMLImporterInternal* Internal;
223 vtkVRMLYaccData* Parser;
224 vtkActor* CurrentActor;
225 vtkProperty* CurrentProperty;
226 vtkLight* CurrentLight;
227 vtkTransform* CurrentTransform;
228 vtkAlgorithm* CurrentSource;
229 vtkPoints* CurrentPoints;
230 vtkFloatArray* CurrentNormals;
231 vtkCellArray* CurrentNormalCells;
232 vtkFloatArray* CurrentTCoords;
233 vtkCellArray* CurrentTCoordCells;
234 vtkLookupTable* CurrentLut;
235 vtkFloatArray* CurrentScalars;
236 vtkPolyDataMapper* CurrentMapper;
237
238 vtkVRMLImporter(const vtkVRMLImporter&) = delete;
239 void operator=(const vtkVRMLImporter&) = delete;
240};
241
242VTK_ABI_NAMESPACE_END
243#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
Superclass for all sources, filters, and sinks in VTK.
object to represent cell connectivity
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:108
a virtual light for 3D rendering
Definition vtkLight.h:159
map scalar values into colors via a lookup table
abstract base class for most VTK objects
Definition vtkObject.h:162
represent and manipulate 3D points
Definition vtkPoints.h:139
map vtkPolyData to graphics primitives
represent surface properties of a geometric object
abstract specification for renderers
describes linear transformations via a 4x4 matrix
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
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
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.