24#include <wx/xml/xml.h>
43 if(
nullptr != aParent )
59 wxT(
" * [INFO] Destroying Transform with %zu children, %zu references, "
60 "and %zu back pointers." ),
105 for( prop = aNode->GetAttributes(); prop !=
nullptr; prop = prop->GetNext() )
107 const wxString& pname = prop->GetName();
109 if( pname == wxT(
"DEF" ) )
111 m_Name = prop->GetValue();
114 else if( pname == wxT(
"center" ) )
119 else if( pname == wxT(
"scale" ) )
123 else if( pname == wxT(
"translation" ) )
128 else if( pname == wxT(
"rotation" ) )
132 else if( pname == wxT(
"scaleOrientation" ) )
142 if(
nullptr == aTopNode ||
nullptr == aNode )
149 for( wxXmlNode* child = aNode->GetChildren(); child !=
nullptr; child = child->GetNext() )
151 wxString
name = child->GetName();
153 if(
name == wxT(
"Transform" ) ||
name == wxT(
"Group" ) )
155 else if(
name == wxT(
"Switch" ) )
157 else if(
name == wxT(
"Shape" ) )
177 if(
nullptr != aParent )
185 if(
nullptr !=
m_Parent && doUnlink )
199 if(
nullptr == aNode )
207 std::list< X3DNODE* >::iterator sC =
m_Children.begin();
208 std::list< X3DNODE* >::iterator eC =
m_Children.end();
229 if(
nullptr == aNode )
237 std::list< X3DNODE* >::iterator sR =
m_Refs.begin();
238 std::list< X3DNODE* >::iterator eR =
m_Refs.end();
248 m_Refs.push_back( aNode );
258 wxT(
" * [INFO] Translating Transform with %zu children, %zu references, "
259 "and %zu back pointers." ),
270 wxT(
" * [BUG] Transform does not have a Transform parent (parent ID: %d)" ),
278 if(
nullptr != aParent )
297 std::list< X3DNODE* >::iterator sC =
m_Children.begin();
298 std::list< X3DNODE* >::iterator eC =
m_Children.end();
308 for(
int i = 0; i < 2; ++i )
312 type = (*sC)->GetNodeType();
320 if(
nullptr != (*sC)->TranslateToSG( txNode.
GetRawPtr() ) )
SGNODE * GetRawPtr(void) noexcept
Return the raw internal SGNODE pointer.
void Destroy(void)
Delete the object held by this wrapper.
The base class of all Scene Graph nodes.
void addNodeRef(X3DNODE *aNode)
Add a pointer to a node which references, but does not own, this node.
std::list< X3DNODE * > m_Children
std::list< X3DNODE * > m_BackPointers
std::list< X3DNODE * > m_Refs
X3DNODES GetNodeType(void) const
Return the type of this node instance.
X3DNODE * GetParent(void) const
Return a pointer to the parent node of this object or NULL if the object has no parent (ie.
virtual bool SetParent(X3DNODE *aParent, bool doUnlink=true)=0
Set the parent X3DNODE of this object.
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)
SGLIB_API SGNODE * GetSGNodeParent(SGNODE *aNode)
SGLIB_API bool AddSGNodeChild(SGNODE *aParent, SGNODE *aChild)
SGLIB_API bool AddSGNodeRef(SGNODE *aParent, SGNODE *aChild)
bool ParseSFRotation(const wxString &aSource, WRLROTATION &aResult)
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)