KiCad PCB EDA Suite
vrml2_appearance.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  *
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 
29 #ifndef VRML2_APPEARANCE_H
30 #define VRML2_APPEARANCE_H
31 
32 #include "vrml2_node.h"
33 
34 class WRL2BASE;
35 class SGNODE;
36 
40 class WRL2APPEARANCE : public WRL2NODE
41 {
42 private:
46 
51  bool checkNodeType( WRL2NODES aType );
52 
53  // overloads
54  void unlinkChildNode( const WRL2NODE* aNode ) override;
55  void unlinkRefNode( const WRL2NODE* aNode ) override;
56 
57 public:
58 
59  // functions inherited from WRL2NODE
60  bool isDangling( void ) override;
61 
62 public:
64  WRL2APPEARANCE( WRL2NODE* aParent );
65  virtual ~WRL2APPEARANCE();
66 
67  // functions inherited from WRL2NODE
68  bool Read( WRLPROC& proc, WRL2BASE* aTopNode ) override;
69  bool AddRefNode( WRL2NODE* aNode ) override;
70  bool AddChildNode( WRL2NODE* aNode ) override;
71  SGNODE* TranslateToSG( SGNODE* aParent ) override;
72 };
73 
74 #endif // VRML2_APPEARANCE_H
WRL2NODE * material
WRL2APPEARANCE.
WRL2NODE represents the base class of all VRML2 nodes.
Definition: vrml2_node.h:58
bool checkNodeType(WRL2NODES aType)
Function checkNodeType returns true if the node type is a material description class.
SGNODE * TranslateToSG(SGNODE *aParent) override
Function TranslateToSG produces a representation of the data using the intermediate scenegraph struct...
void unlinkRefNode(const WRL2NODE *aNode) override
Function unlinkRef removes pointers to a referenced node; it is invoked by the referenced node upon d...
void unlinkChildNode(const WRL2NODE *aNode) override
Function unlinkChild removes references to an owned child; it is invoked by the child upon destructio...
SGNODE represents the base class of all Scene Graph nodes.
Definition: sg_node.h:76
bool AddRefNode(WRL2NODE *aNode) override
WRL2BASE represents the top node of a VRML2 model.
Definition: vrml2_base.h:59
WRL2NODE * texture
virtual ~WRL2APPEARANCE()
WRL2NODE * textureTransform
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
bool isDangling(void) override
Function isDangling returns true if the object does not have a parent which is a logical container fo...
WRL2NODES
Definition: wrltypes.h:121
bool AddChildNode(WRL2NODE *aNode) override