48 wxLogTrace(
traceVrmlPlugin, wxT(
" * [INFO] Destroying virtual base node." ) );
56 wxCHECK_MSG(
false,
false, wxT(
"Attempt to set parent on WRL1BASE node." ) );
62 wxCHECK_MSG(
false, std::string(
"" ),
63 wxT(
"Attempt to extract name from virtual base node." ) );
69 wxCHECK_MSG(
false,
false, wxT(
"Attempt to set name on virtual base node." ) );
76 wxT(
"No open file or file is not a VRML1 file" ) );
85 if( !
ReadNode( proc,
this,
nullptr ) )
88 wxT(
"%s:%s:%d\n * [INFO] bad file format; unexpected eof %s" ),
98 __FILE__, __FUNCTION__, __LINE__, proc.
GetError() );
109 if(
nullptr != aNode )
112 wxCHECK_MSG( aParent,
false, wxT(
"Invoked with invalid parent." ) );
128 wxLogTrace(
traceVrmlPlugin, wxT(
"%s:%s:%d\n * [INFO] node '%s' not found." ),
129 __FILE__, __FUNCTION__, __LINE__, glob );
137 wxT(
"%s:%s:%d\n * [INFO] failed to add node '%s' (%s) to parent of type %s." ),
138 __FILE__, __FUNCTION__, __LINE__, glob,
145 if(
nullptr != aNode )
154 if(
nullptr != aNode )
157 wxCHECK_MSG(
nullptr != aParent,
false, wxT(
"Invalid parent pointer." ) );
165 __FILE__, __FUNCTION__, __LINE__, proc.
GetError() );
170 if(
ReadNode( proc, aParent, &lnode ) )
172 if(
nullptr != aNode )
175 if( lnode && !lnode->
SetName( glob ) )
178 wxT(
"%s:%s:%d\n * [INFO] bad formatting (invalid name) %s." ),
204 if(
nullptr != aNode )
207 wxCHECK_MSG( aParent,
false, wxT(
"Invalid parent pointer." ) );
217 __FILE__, __FUNCTION__, __LINE__, proc.
GetError() );
227 if( !glob.compare(
"USE" ) )
235 if( !glob.compare(
"DEF" ) )
245 wxLogTrace(
traceVrmlPlugin, wxT(
" * [INFO] Processing node '%s' ID: %d." ), glob, ntype );
313 wxT(
"%s:%s:%d\n * [INFO] could not discard node %s." ),
321 wxT(
" * [INFO] discarded node '%s' %s (currently unsupported)." ),
334 wxCHECK_MSG(
false,
false, wxT(
"This method must never be invoked on a WRL1BASE object" ) );
340 if(
nullptr != aNode )
345 if( !np->
Read( proc,
this ) )
351 if(
nullptr != aNode )
360 if(
nullptr != aNode )
365 if( !np->
Read( proc,
this ) )
371 if(
nullptr != aNode )
382 if( !np->
Read( proc,
this ) )
388 if(
nullptr != aNode )
397 if(
nullptr != aNode )
402 if( !np->
Read( proc,
this ) )
408 if(
nullptr != aNode )
417 if(
nullptr != aNode )
422 if( !np->
Read( proc,
this ) )
428 if(
nullptr != aNode )
437 if(
nullptr != aNode )
442 if( !np->
Read( proc,
this ) )
448 if(
nullptr != aNode )
457 if(
nullptr != aNode )
462 if( !np->
Read( proc,
this ) )
468 if(
nullptr != aNode )
477 if(
nullptr != aNode )
482 if( !np->
Read( proc,
this ) )
488 if(
nullptr != aNode )
497 if(
nullptr != aNode )
502 if( !np->
Read( proc,
this ) )
508 if(
nullptr != aNode )
517 wxLogTrace(
traceVrmlPlugin, wxT(
" * [INFO] Translating VRML1 Base with %zu items." ),
524 return ( *
m_Items.begin() )->TranslateToSG(
nullptr,
nullptr );
533 bool hasContent =
false;
535 std::list< WRL1NODE* >::iterator sI =
m_Items.begin();
536 std::list< WRL1NODE* >::iterator eI =
m_Items.end();
542 if(
nullptr != (*sI)->TranslateToSG( node, &
m_current ) )
SGNODE * GetRawPtr(void) noexcept
Return the raw internal SGNODE pointer.
void Destroy(void)
Delete the object held by this wrapper.
The base class of all Scene Graph nodes.
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
bool implementDef(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool readSeparator(WRLPROC &proc, WRL1NODE *aParent, WRL1NODE **aNode)
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
WRL1NODE(NAMEREGISTER *aDictionary)
WRL1NODES getNodeTypeID(const std::string &aNodeName)
Return the ID based on the given aNodeName or WRL1_INVALID (WRL1_END) if no such node name exists.
std::list< WRL1NODE * > m_Items
NAMEREGISTER * m_dictionary
virtual WRL1NODE * FindNode(const std::string &aNodeName)
Search the tree of linked nodes and returns a reference to the current node with the given name.
virtual bool AddRefNode(WRL1NODE *aNode)
virtual bool SetName(const std::string &aName)
const char * GetNodeTypeName(WRL1NODES aNodeType) const
WRL1NODES GetNodeType(void) const
Return the type of this node instance.
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
bool Read(WRLPROC &proc, WRL1BASE *aTopNode) override
WRLVERSION GetVRMLType(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