40 m_Type = WRL2NODES::WRL2_INDEXEDLINESET;
47 m_Type = WRL2NODES::WRL2_INDEXEDLINESET;
58 wxT(
" * [INFO] Destroying IndexedLineSet node with %zu children, %zu"
59 "references, and %zu back pointers." ),
80 case WRL2NODES::WRL2_COLOR:
81 case WRL2NODES::WRL2_COORDINATE:
106 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
114 " * [INFO] bad file format; unexpected child node '%s'." ),
120 if( WRL2NODES::WRL2_COLOR == type )
122 if(
nullptr !=
color )
126 " * [INFO] bad file format; multiple color nodes." ),
127 __FILE__, __FUNCTION__, __LINE__ );
136 if( WRL2NODES::WRL2_COORDINATE == type )
138 if(
nullptr !=
coord )
142 " * [INFO] bad file format; multiple coord nodes." ),
143 __FILE__, __FUNCTION__, __LINE__ );
158 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
166 " * [INFO] bad file format; unexpected child node '%s'." ),
172 if( WRL2NODES::WRL2_COLOR == type )
174 if(
nullptr !=
color )
178 " * [INFO] bad file format; multiple color nodes." ),
179 __FILE__, __FUNCTION__, __LINE__ );
188 if( WRL2NODES::WRL2_COORDINATE == type )
190 if(
nullptr !=
coord )
194 " * [INFO] bad file format; multiple coord nodes." ),
195 __FILE__, __FUNCTION__, __LINE__ );
211 char tok = proc.
Peek();
216 " * [INFO] bad file format; unexpected eof %s." ),
226 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
237 if( proc.
Peek() ==
'}' )
247 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
262 if( !glob.compare(
"colorPerVertex" ) )
267 " * [INFO] invalid colorPerVertex %s\n"
268 " * [INFO] file: '%s'\n"
276 else if( !glob.compare(
"colorIndex" ) )
281 " * [INFO] invalid colorIndex %s\n"
282 " * [INFO] file: '%s'\n"
290 else if( !glob.compare(
"coordIndex" ) )
295 " * [INFO] invalid coordIndex %s\n"
296 " * [INFO] file: '%s'\n"
304 else if( !glob.compare(
"color" ) )
306 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
310 " * [INFO] could not read color node information." ),
311 __FILE__, __FUNCTION__, __LINE__ );
316 else if( !glob.compare(
"coord" ) )
318 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
322 " * [INFO] could not read coord node information." ),
323 __FILE__, __FUNCTION__, __LINE__ );
332 " * [INFO] invalid IndexedFaceSet %s\n"
333 " * [INFO] file: '%s'\n" ),
354 if(
nullptr == aNode )
361 else if( aNode ==
coord )
371 if(
nullptr == aNode )
378 else if( aNode ==
coord )
388 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)
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
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.
std::vector< int > coordIndex
void unlinkRefNode(const WRL2NODE *aNode) override
Remove pointers to a referenced node.
std::vector< int > colorIndex
bool AddChildNode(WRL2NODE *aNode) override
void unlinkChildNode(const WRL2NODE *aNode) override
Remove references to an owned child.
bool AddRefNode(WRL2NODE *aNode) override
bool checkNodeType(WRL2NODES aType)
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)
std::string GetFileName(void)
bool ReadMFInt(std::vector< int > &aMFInt32)
std::string GetError(void)
bool ReadSFBool(bool &aSFBool)
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