KiCad PCB EDA Suite
wrltypes.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Cirilo Bernardo <[email protected]>
5  * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
31 #ifndef WRLTYPES_H
32 #define WRLTYPES_H
33 
34 #include <wx/defs.h>
35 
36 #define GLM_FORCE_RADIANS
37 #include <glm/glm.hpp>
38 
39 // Mask for VRML tracing.
40 extern const wxChar* const traceVrmlPlugin;
41 
42 // version of the VRML file being parsed
43 enum class WRLVERSION
44 {
45  VRML_INVALID = 0, // not a valid VRML file
46  VRML_V1,
47  VRML_V2
48 };
49 
50 
51 // VRML1 Node Types
52 // These are used to look up node names and to quickly
53 // determine what routine to invoke to read a section of
54 // a file.
55 enum class WRL1NODES
56 {
57  WRL1_BASE = 0, // not really a VRML node but we need a top level virtual node
58  WRL1_BEGIN,
60  WRL1_CONE,
62  WRL1_CUBE,
66  WRL1_GROUP,
69  WRL1_INFO,
70  WRL1_LOD,
81  WRL1_SCALE,
96 };
97 
98 // VRML1 Material/Normal Binding values
99 // note: PART/FACE have the same meaning in the specification
100 enum class WRL1_BINDING
101 {
102  BIND_DEFAULT = 0,
103  BIND_OVERALL,
110  BIND_END
111 };
112 
113 enum class WRL1_ORDER
114 {
115  ORD_UNKNOWN = 0,
117  ORD_CCW
118 };
119 
120 // VRML2 Node Types
121 // These are used to look up node names and to quickly
122 // determine what routine to invoke to read a section of
123 // a file.
124 enum class WRL2NODES
125 {
126  WRL2_BASE = 0, // not really a VRML node but we need a top level virtual node
127  WRL2_BEGIN,
133  WRL2_BOX,
135  WRL2_COLOR,
137  WRL2_CONE,
145  WRL2_FOG,
147  WRL2_GROUP,
151  WRL2_INLINE,
152  WRL2_LOD,
156  WRL2_NORMAL,
166  WRL2_SCRIPT,
167  WRL2_SHAPE,
168  WRL2_SOUND,
169  WRL2_SPHERE,
172  WRL2_SWITCH,
173  WRL2_TEXT,
182  WRL2_INVALID,
184 };
185 
186 
187 typedef glm::vec2 WRLVEC2F;
188 typedef glm::vec3 WRLVEC3F;
189 typedef glm::vec4 WRLROTATION;
190 
191 #endif // WRLTYPES_H
glm::vec3 WRLVEC3F
Definition: wrltypes.h:188
WRLVERSION
Definition: wrltypes.h:43
glm::vec2 WRLVEC2F
Definition: wrltypes.h:187
glm::vec4 WRLROTATION
Definition: wrltypes.h:189
WRL1_BINDING
Definition: wrltypes.h:100
WRL1_ORDER
Definition: wrltypes.h:113
const wxChar *const traceVrmlPlugin
Flag to enable VRML plugin trace output.
Definition: vrml.cpp:63
WRL1NODES
Definition: wrltypes.h:55
WRL2NODES
Definition: wrltypes.h:124