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 <cirilo.bernardo@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
30 #ifndef WRLTYPES_H
31 #define WRLTYPES_H
32 
33 #define GLM_FORCE_RADIANS
34 #include <glm/glm.hpp>
35 
36 // log mask for wxLogTrace
37 #define MASK_VRML "PLUGIN_VRML"
38 
39 // version of the VRML file being parsed
40 enum class WRLVERSION
41 {
42  VRML_INVALID = 0, // not a valid VRML file
43  VRML_V1,
44  VRML_V2
45 };
46 
47 
48 // VRML1 Node Types
49 // These are used to look up node names and to quickly
50 // determine what routine to invoke to read a section of
51 // a file.
52 enum class WRL1NODES
53 {
54  WRL1_BASE = 0, // not really a VRML node but we need a top level virtual node
55  WRL1_BEGIN,
57  WRL1_CONE,
59  WRL1_CUBE,
63  WRL1_GROUP,
66  WRL1_INFO,
67  WRL1_LOD,
78  WRL1_SCALE,
93 };
94 
95 // VRML1 Material/Normal Binding values
96 // note: PART/FACE have the same meaning in the specification
97 enum class WRL1_BINDING
98 {
99  BIND_DEFAULT = 0,
100  BIND_OVERALL,
107  BIND_END
108 };
109 
110 enum class WRL1_ORDER
111 {
112  ORD_UNKNOWN = 0,
114  ORD_CCW
115 };
116 
117 // VRML2 Node Types
118 // These are used to look up node names and to quickly
119 // determine what routine to invoke to read a section of
120 // a file.
121 enum class WRL2NODES
122 {
123  WRL2_BASE = 0, // not really a VRML node but we need a top level virtual node
124  WRL2_BEGIN,
130  WRL2_BOX,
132  WRL2_COLOR,
134  WRL2_CONE,
142  WRL2_FOG,
144  WRL2_GROUP,
148  WRL2_INLINE,
149  WRL2_LOD,
153  WRL2_NORMAL,
163  WRL2_SCRIPT,
164  WRL2_SHAPE,
165  WRL2_SOUND,
166  WRL2_SPHERE,
169  WRL2_SWITCH,
170  WRL2_TEXT,
179  WRL2_INVALID,
181 };
182 
183 
184 typedef glm::vec2 WRLVEC2F;
185 typedef glm::vec3 WRLVEC3F;
186 typedef glm::vec4 WRLROTATION;
187 
188 #endif // WRLTYPES_H
glm::vec3 WRLVEC3F
Definition: wrltypes.h:185
WRLVERSION
Definition: wrltypes.h:40
glm::vec2 WRLVEC2F
Definition: wrltypes.h:184
glm::vec4 WRLROTATION
Definition: wrltypes.h:186
WRL1_BINDING
Definition: wrltypes.h:97
WRL1_ORDER
Definition: wrltypes.h:110
WRL1NODES
Definition: wrltypes.h:52
WRL2NODES
Definition: wrltypes.h:121