VTK  9.6.1
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
49
50#ifndef vtkVRMLImporter_h
51#define vtkVRMLImporter_h
52
53#include "vtkIOImportModule.h" // For export macro
54#include "vtkImporter.h"
55
56VTK_ABI_NAMESPACE_BEGIN
57class vtkActor;
58class vtkAlgorithm;
59class vtkProperty;
60class vtkLight;
61class vtkTransform;
62class vtkLookupTable;
63class vtkFloatArray;
65class vtkPoints;
66class vtkIdTypeArray;
67class vtkVRMLImporterInternal;
68class vtkVRMLYaccData;
69class vtkCellArray;
70
71class VTKIOIMPORT_EXPORT vtkVRMLImporter : public vtkImporter
72{
73public:
75
77 void PrintSelf(ostream& os, vtkIndent indent) override;
78
80
84 vtkSetMacro(ShapeResolution, int);
85 vtkGetMacro(ShapeResolution, int);
87
96 vtkObject* GetVRMLDEFObject(const char* name);
97
101 std::string GetOutputsDescription() override;
102
103protected:
106
108 int ImportBegin() override;
109 void ImportEnd() override;
110 void ImportActors(vtkRenderer*) override {}
111 void ImportCameras(vtkRenderer*) override {}
112 void ImportLights(vtkRenderer*) override {}
113 void ImportProperties(vtkRenderer*) override {}
114
116
119 virtual void enterNode(const char*);
120 virtual void exitNode();
121 virtual void enterField(const char*);
122 virtual void exitField();
123 virtual void useNode(const char*);
125
129 FILE* GetFileFD() { return this->FileFD; }
130
131 FILE* FileFD;
133
134 friend class vtkVRMLYaccData;
135
136private:
137 vtkPoints* PointsNew();
138 vtkFloatArray* FloatArrayNew();
139 vtkIdTypeArray* IdTypeArrayNew();
140
141 void DeleteObject(vtkObject*);
142
143 vtkVRMLImporterInternal* Internal;
144 vtkVRMLYaccData* Parser;
145 vtkActor* CurrentActor;
146 vtkProperty* CurrentProperty;
147 vtkLight* CurrentLight;
148 vtkTransform* CurrentTransform;
149 vtkAlgorithm* CurrentSource;
150 vtkPoints* CurrentPoints;
151 vtkFloatArray* CurrentNormals;
152 vtkCellArray* CurrentNormalCells;
153 vtkFloatArray* CurrentTCoords;
154 vtkCellArray* CurrentTCoordCells;
155 vtkLookupTable* CurrentLut;
156 vtkFloatArray* CurrentScalars;
157 vtkPolyDataMapper* CurrentMapper;
158
159 vtkVRMLImporter(const vtkVRMLImporter&) = delete;
160 void operator=(const vtkVRMLImporter&) = delete;
161};
162
163VTK_ABI_NAMESPACE_END
164#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:42
object to represent cell connectivity
dynamic, self-adjusting array of float
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:29
a virtual light for 3D rendering
Definition vtkLight.h:50
map scalar values into colors via a lookup table
represent and manipulate 3D points
Definition vtkPoints.h:30
map vtkPolyData to graphics primitives
represent surface properties of a geometric object
Definition vtkProperty.h:60
abstract specification for renderers
Definition vtkRenderer.h:64
describes linear transformations via a 4x4 matrix
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.
friend class vtkVRMLYaccData
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define vtkAlgorithm