21#include <wx/tokenzr.h>
22#include <wx/xml/xml.h>
33 if(
nullptr == aParent ||
nullptr == aNode )
38 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
40 const wxString& pname = prop->GetName();
42 if( pname == wxT(
"USE" ) )
58 if( !node->
Read( aNode, aParent, aDict ) )
78 if(
nullptr == aParent ||
nullptr == aNode )
83 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
85 const wxString& pname = prop->GetName();
87 if( pname == wxT(
"USE" ) )
103 if( !node->
Read( aNode, aParent, aDict ) )
116 if(
nullptr == aParent ||
nullptr == aNode )
119 wxXmlAttribute* prop;
121 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
123 const wxString& pname = prop->GetName();
125 if( pname == wxT(
"USE" ) )
141 if( !node->
Read( aNode, aParent, aDict ) )
154 if(
nullptr == aParent ||
nullptr == aNode )
157 wxXmlAttribute* prop;
159 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
161 const wxString& pname = prop->GetName();
163 if( pname == wxT(
"USE" ) )
179 if( !node->
Read( aNode, aParent, aDict ) )
192 if(
nullptr == aParent ||
nullptr == aNode )
195 wxXmlAttribute* prop;
197 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
199 const wxString& pname = prop->GetName();
201 if( pname == wxT(
"USE" ) )
217 if( !node->
Read( aNode, aParent, aDict ) )
229 wxStringTokenizer tokens( aSource );
230 wxString val = tokens.GetNextToken();
232 if( val == wxT(
"TRUE" ) || val == wxT(
"1" ) )
238 if( val == wxT(
"FALSE" ) || val == wxT(
"0" ) )
250 wxStringTokenizer tokens( aSource );
253 bool ret = tokens.GetNextToken().ToCDouble( &x );
262 wxStringTokenizer tokens( aSource );
268 bool ret = tokens.GetNextToken().ToCDouble( &x )
269 && tokens.GetNextToken().ToCDouble( &y )
270 && tokens.GetNextToken().ToCDouble( &z );
282 wxStringTokenizer tokens( aSource );
289 bool ret = tokens.GetNextToken().ToCDouble( &x )
290 && tokens.GetNextToken().ToCDouble( &y )
291 && tokens.GetNextToken().ToCDouble( &z )
292 && 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)