KiCad PCB EDA Suite
x3d_ops.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) 2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
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 
30 #ifndef X3D_OPS_H
31 #define X3D_OPS_H
32 
33 #include "x3d_base.h"
34 #include "wrltypes.h"
35 
36 namespace X3D
37 {
38  /* Functions to create and read X3D Nodes */
39  bool ReadTransform( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
40  bool ReadSwitch( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
41  bool ReadShape( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
42  bool ReadAppearance( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
43  bool ReadIndexedFaceSet( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
44  bool ReadCoordinates( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict );
45 
46  bool ParseSFBool( const wxString& aSource, bool& aResult );
47  bool ParseSFFloat( const wxString& aSource, float& aResult );
48  bool ParseSFVec3( const wxString& aSource, WRLVEC3F& aResult );
49  bool ParseSFRotation( const wxString& aSource, WRLROTATION& aResult );
50 }
51 
52 #endif // X3D_OPS_H
53 
bool ReadIndexedFaceSet(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:155
glm::vec3 WRLVEC3F
Definition: wrltypes.h:188
declares base class of X3D tree
Definition: x3d_ops.h:36
bool ReadTransform(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:34
glm::vec4 WRLROTATION
Definition: wrltypes.h:189
The base class of all X3D nodes.
Definition: x3d_base.h:74
bool ReadAppearance(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:117
bool ParseSFFloat(const wxString &aSource, float &aResult)
Definition: x3d_ops.cpp:252
bool ParseSFRotation(const wxString &aSource, WRLROTATION &aResult)
Definition: x3d_ops.cpp:284
bool ReadShape(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:79
bool ParseSFBool(const wxString &aSource, bool &aResult)
Definition: x3d_ops.cpp:231
bool ParseSFVec3(const wxString &aSource, WRLVEC3F &aResult)
Definition: x3d_ops.cpp:264
bool ReadSwitch(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:72
declares some compound types used for VRML
bool ReadCoordinates(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
Definition: x3d_ops.cpp:193