35#include <wx/tokenzr.h> 
   36#include <wx/wfstream.h> 
   37#include <wx/xml/xml.h> 
   48    wxFFileInputStream stream( aFileName );
 
   51    if( !stream.IsOk() || !doc.Load( stream ) )
 
   54    if( doc.GetRoot()->GetName() != wxT( 
"X3D" ) )
 
   66    for( NODE_LIST::iterator node_it = children.begin(); node_it != children.end(); ++node_it )
 
   68        wxXmlNode* node = *node_it;
 
   69        wxString 
name = node->GetName();
 
   71        if( 
name == wxT( 
"Transform" ) || 
name == wxT( 
"Group" ) )
 
   76        else if( 
name == wxT( 
"Switch" ) )
 
 
   95    wxXmlNode* scene = 
nullptr;
 
   97    for( wxXmlNode* child = aNode->GetChildren(); child != 
nullptr; child = child->GetNext() )
 
   99        if( child->GetName() == wxT( 
"Scene" ) )
 
  106    if( 
nullptr == scene )
 
  109    for( wxXmlNode* child = scene->GetChildren(); child != 
nullptr; child = child->GetNext() )
 
  111        const wxString& 
name = child->GetName();
 
  113        if( 
name == wxT( 
"Transform" ) || 
name == wxT( 
"Switch" ) || 
name == wxT( 
"Group" ) )
 
  114            aResult.push_back( child );
 
  117    if( aResult.empty() )
 
 
Define the basic data set required to represent a 3D model.
 
The base class of all X3D nodes.
 
virtual SGNODE * TranslateToSG(SGNODE *aParent)=0
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
 
bool getGroupingNodes(wxXmlNode *aNode, std::vector< wxXmlNode * > &aResult)
Retrieve all permissible top-level nodes in an X3D/VRML file.
 
SCENEGRAPH * Load(const wxString &aFileName)
 
collects header files for all SG* wrappers and the API
 
bool ReadSwitch(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
 
bool ReadTransform(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
 
std::vector< wxXmlNode * > NODE_LIST