KiCad PCB EDA Suite
Loading...
Searching...
No Matches
vrml1_base.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-2016 Cirilo Bernardo <[email protected]>
5 * Copyright The 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, see <https://www.gnu.org/licenses/>.
19 */
20
26
27#ifndef VRML1_BASE_H
28#define VRML1_BASE_H
29
30#include <list>
31#include <string>
32#include <map>
33
34#include "vrml1_node.h"
35
36class SGNODE;
37class WRL1INLINE;
38
42class WRL1BASE : public WRL1NODE
43{
44public:
45 WRL1BASE();
46 virtual ~WRL1BASE();
47
48 // function to read entire VRML file
49 bool Read( WRLPROC& proc );
50
51 // read in a VRML node
52 bool ReadNode( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
53
54 virtual std::string GetName( void ) override;
55 virtual bool SetName( const std::string& aName ) override;
56
57 bool Read( WRLPROC& proc, WRL1BASE* aTopNode ) override;
58 bool SetParent( WRL1NODE* aParent, bool doUnlink = true ) override;
59 SGNODE* TranslateToSG( SGNODE* aParent, WRL1STATUS* sp ) override;
60
61private:
62 // handle cases of USE / DEF
63 bool implementUse( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
64 bool implementDef( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
65
66 bool readGroup( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
67 bool readSeparator( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
68 bool readSwitch( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
69 bool readMaterial( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
70 bool readMatBinding( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
71 bool readCoords( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
72 bool readFaceSet( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
73 bool readTransform( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
74 bool readShapeHints( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode );
75};
76
77#endif // VRML1_BASE_H
The base class of all Scene Graph nodes.
Definition sg_node.h:71
bool readMaterial(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool implementUse(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readMatBinding(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readFaceSet(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readCoords(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool ReadNode(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readTransform(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readShapeHints(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
virtual std::string GetName(void) override
bool SetParent(WRL1NODE *aParent, bool doUnlink=true) override
Set the parent WRL1NODE of this object.
bool readGroup(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readSwitch(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
SGNODE * TranslateToSG(SGNODE *aParent, WRL1STATUS *sp) override
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
virtual bool SetName(const std::string &aName) override
virtual ~WRL1BASE()
bool implementDef(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool Read(WRLPROC &proc)
bool readSeparator(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
WRL1NODE(NAMEREGISTER *aDictionary)
Define the base class for VRML1.0 nodes.