40 m_Type = WRL2NODES::WRL2_POINTSET;
47 m_Type = WRL2NODES::WRL2_POINTSET;
58 wxT(
" * [INFO] Destroying PointSet node with %zu children, %zu"
59 "references, and %zu back pointers." ),
79 case WRL2NODES::WRL2_COLOR:
80 case WRL2NODES::WRL2_COORDINATE:
104 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
112 " * [INFO] bad file format; unexpected child node '%s'." ),
118 if( WRL2NODES::WRL2_COLOR == type )
120 if(
nullptr !=
color )
124 " * [INFO] bad file format; multiple color nodes." ),
125 __FILE__, __FUNCTION__, __LINE__ );
134 if( WRL2NODES::WRL2_COORDINATE == type )
136 if(
nullptr !=
coord )
140 " * [INFO] bad file format; multiple coord nodes." ),
141 __FILE__, __FUNCTION__, __LINE__ );
156 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
164 " * [INFO] bad file format; unexpected child node '%s'." ),
170 if( WRL2NODES::WRL2_COLOR == type )
172 if(
nullptr !=
color )
176 " * [INFO] bad file format; multiple color nodes." ),
177 __FILE__, __FUNCTION__, __LINE__ );
186 if( WRL2NODES::WRL2_COORDINATE == type )
188 if(
nullptr !=
coord )
192 " * [INFO] bad file format; multiple coord nodes." ),
193 __FILE__, __FUNCTION__, __LINE__ );
209 char tok = proc.
Peek();
214 " * [INFO] bad file format; unexpected eof %s." ),
224 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
235 if( proc.
Peek() ==
'}' )
245 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
253 if( !glob.compare(
"color" ) )
255 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
259 " * [INFO] could not read color node information." ),
260 __FILE__, __FUNCTION__, __LINE__ );
265 else if( !glob.compare(
"coord" ) )
267 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
271 " * [INFO] could not read coord node information." ),
272 __FILE__, __FUNCTION__, __LINE__ );
281 " * [INFO] invalid PointSet %s (no closing brace)\n"
282 " * [INFO] file: '%s'\n" ),
303 if(
nullptr == aNode )
310 else if( aNode ==
coord )
320 if(
nullptr == aNode )
327 else if( aNode ==
coord )
338 if(
nullptr ==
color )
The base class of all Scene Graph nodes.
The top node of a VRML2 model.
bool ReadNode(WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode)
std::list< WRL2NODE * > m_BackPointers
WRL2NODE * GetParent(void) const
virtual void unlinkChildNode(const WRL2NODE *aNode)
Remove references to an owned child.
std::list< WRL2NODE * > m_Children
virtual bool AddRefNode(WRL2NODE *aNode)
virtual void unlinkRefNode(const WRL2NODE *aNode)
Remove pointers to a referenced node.
const char * GetNodeTypeName(WRL2NODES aNodeType) const
WRL2NODES GetNodeType(void) const
std::list< WRL2NODE * > m_Refs
virtual bool AddChildNode(WRL2NODE *aNode)
SGNODE * TranslateToSG(SGNODE *aParent) override
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
bool isDangling(void) override
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
bool AddChildNode(WRL2NODE *aNode) override
void unlinkChildNode(const WRL2NODE *aNode) override
Remove references to an owned child.
void unlinkRefNode(const WRL2NODE *aNode) override
Remove pointers to a referenced node.
bool AddRefNode(WRL2NODE *aNode) override
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
bool checkNodeType(WRL2NODES aType)
std::string GetFileName(void)
std::string GetError(void)
bool ReadName(std::string &aName)
std::string GetFilePosition() const
const wxChar *const traceVrmlPlugin
Flag to enable VRML plugin trace output.
collects header files for all SG* wrappers and the API