25#include <wx/tokenzr.h>
26#include <wx/xml/xml.h>
37 if(
nullptr == aParent ||
nullptr == aNode )
42 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
44 const wxString& pname = prop->GetName();
46 if( pname == wxT(
"USE" ) )
62 if( !node->
Read( aNode, aParent, aDict ) )
82 if(
nullptr == aParent ||
nullptr == aNode )
87 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
89 const wxString& pname = prop->GetName();
91 if( pname == wxT(
"USE" ) )
107 if( !node->
Read( aNode, aParent, aDict ) )
120 if(
nullptr == aParent ||
nullptr == aNode )
123 wxXmlAttribute* prop;
125 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
127 const wxString& pname = prop->GetName();
129 if( pname == wxT(
"USE" ) )
145 if( !node->
Read( aNode, aParent, aDict ) )
158 if(
nullptr == aParent ||
nullptr == aNode )
161 wxXmlAttribute* prop;
163 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
165 const wxString& pname = prop->GetName();
167 if( pname == wxT(
"USE" ) )
183 if( !node->
Read( aNode, aParent, aDict ) )
196 if(
nullptr == aParent ||
nullptr == aNode )
199 wxXmlAttribute* prop;
201 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
203 const wxString& pname = prop->GetName();
205 if( pname == wxT(
"USE" ) )
221 if( !node->
Read( aNode, aParent, aDict ) )
233 wxStringTokenizer tokens( aSource );
234 wxString val = tokens.GetNextToken();
236 if( val == wxT(
"TRUE" ) || val == wxT(
"1" ) )
242 if( val == wxT(
"FALSE" ) || val == wxT(
"0" ) )
254 wxStringTokenizer tokens( aSource );
257 bool ret = tokens.GetNextToken().ToCDouble( &x );
266 wxStringTokenizer tokens( aSource );
272 bool ret = tokens.GetNextToken().ToCDouble( &x )
273 && tokens.GetNextToken().ToCDouble( &y )
274 && tokens.GetNextToken().ToCDouble( &z );
286 wxStringTokenizer tokens( aSource );
293 bool ret = tokens.GetNextToken().ToCDouble( &x )
294 && tokens.GetNextToken().ToCDouble( &y )
295 && tokens.GetNextToken().ToCDouble( &z )
296 && tokens.GetNextToken().ToCDouble( &w );
The base class of all X3D nodes.
virtual bool Read(wxXmlNode *aNode, X3DNODE *aTopNode, X3D_DICT &aDict)=0
virtual bool AddRefNode(X3DNODE *aNode)=0
X3DNODE * FindName(const wxString &aName)
bool ParseSFBool(const wxString &aSource, bool &aResult)
bool ParseSFRotation(const wxString &aSource, WRLROTATION &aResult)
bool ReadIndexedFaceSet(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
bool ParseSFVec3(const wxString &aSource, WRLVEC3F &aResult)
bool ReadSwitch(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
bool ReadShape(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
bool ReadTransform(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
bool ReadCoordinates(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)
bool ParseSFFloat(const wxString &aSource, float &aResult)
bool ReadAppearance(wxXmlNode *aNode, X3DNODE *aParent, X3D_DICT &aDict)