51 wxT(
" * [INFO] Destroying Switch node with %zu children, %zu"
52 "references, and %zu back pointers." ),
75 wxCHECK_MSG( aTopNode,
false, wxT(
"Invalid top node." ) );
77 char tok = proc.
Peek();
82 " * [INFO] bad file format; unexpected eof %s." ),
92 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
103 if( proc.
Peek() ==
'}' )
113 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
121 if( !glob.compare(
"whichChoice" ) )
126 " * [INFO] invalid whichChoice %s\n"
127 " * [INFO] file: '%s'\n"
135 else if( !glob.compare(
"choice" ) )
144 " * [INFO] invalid Switch %s.\n"
145 " * [INFO] file: '%s'\n" ),
159 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
185 char tok = proc.
Peek();
190 " * [INFO] bad file format; unexpected eof %s." ),
201 if( !aTopNode->
ReadNode( proc,
this, &child ) )
204 if(
nullptr != child )
207 if( proc.
Peek() ==
',' )
217 if( proc.
Peek() ==
']' )
223 if( !aTopNode->
ReadNode( proc,
this, &child ) )
226 if(
nullptr != child )
229 if( proc.
Peek() ==
',' )
241 wxT(
" * [INFO] Translating Switch with %zu children, %zu references, and"
242 "%zu back pointers." ),
247 wxLogTrace(
traceVrmlPlugin, wxT(
" * [INFO] Switch translation: no choices." ) );
255 wxString::Format( wxT(
"Switch does not have a Transform parent (parent "
256 "ID: %d)." ), ptype ) );
261 wxT(
" * [INFO] Switch translation: no choice (choices = %zu), "
The base class of all Scene Graph nodes.
The top node of a VRML2 model.
bool ReadNode(WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode)
virtual bool isDangling(void)=0
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
std::list< WRL2NODE * > m_BackPointers
WRL2NODE * GetParent(void) const
virtual bool SetParent(WRL2NODE *aParent, bool doUnlink=true)
Set the parent WRL2NODE of this object.
std::list< WRL2NODE * > m_Children
virtual bool AddRefNode(WRL2NODE *aNode)
WRL2NODES GetNodeType(void) const
std::list< WRL2NODE * > m_Refs
virtual bool AddChildNode(WRL2NODE *aNode)
bool isDangling(void) override
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
SGNODE * TranslateToSG(SGNODE *aParent) override
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
bool AddRefNode(WRL2NODE *aNode) override
bool readChildren(WRLPROC &proc, WRL2BASE *aTopNode)
std::vector< WRL2NODE * > choices
bool ReadSFInt(int &aSFInt32)
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
SGLIB_API S3D::SGTYPES GetSGNodeType(SGNODE *aNode)