36 m_Type = WRL2NODES::WRL2_TRANSFORM;
42 m_Type = WRL2NODES::WRL2_TRANSFORM;
53 wxT(
" * [INFO] Destroying Transform node with %zu children, %zu"
54 "references, and %zu back pointers." ),
85 wxCHECK_MSG( aTopNode,
false, wxT(
"Invalid top node." ) );
109 char tok = proc.
Peek();
114 " * [INFO] bad file format; unexpected eof %s." ),
124 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
135 if( proc.
Peek() ==
'}' )
145 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
157 if( !glob.compare(
"center" ) )
162 " * [INFO] invalid center %s\n"
163 " * [INFO] file: '%s'\n"
176 else if( !glob.compare(
"rotation" ) )
181 " * [INFO] invalid rotation %s\n"
182 " * [INFO] file: '%s'\n"
190 else if( !glob.compare(
"scale" ) )
195 " * [INFO] invalid scale %s\n"
196 " * [INFO] file: '%s'\n"
204 else if( !glob.compare(
"scaleOrientation" ) )
209 " * [INFO] invalid scaleOrientation %s\n"
210 " * [INFO] file: '%s'\n"
218 else if( !glob.compare(
"translation" ) )
223 " * [INFO] invalid translation %s\n"
224 " * [INFO] file: '%s'\n"
237 else if( !glob.compare(
"children" ) )
246 " * [INFO] invalid Transform %s.\n"
247 " * [INFO] file: '%s'\n" ),
261 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
289 char tok = proc.
Peek();
294 " * [INFO] bad file format; unexpected eof %s." ),
303 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
306 if( proc.
Peek() ==
',' )
316 if( proc.
Peek() ==
']' )
322 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
325 if( proc.
Peek() ==
',' )
336 wxT(
" * [INFO] Translating Switch with %zu children, %zu references, and"
337 "%zu back pointers." ),
346 wxString::Format( wxT(
"Transform does not have a Transform parent (parent "
347 "ID: %d)." ), ptype ) );
351 if(
nullptr != aParent )
370 std::list< WRL2NODE* >::iterator sC =
m_Children.begin();
371 std::list< WRL2NODE* >::iterator eC =
m_Children.end();
381 for(
int i = 0; i < 2; ++i )
385 type = (*sC)->GetNodeType();
389 case WRL2NODES::WRL2_SHAPE:
390 case WRL2NODES::WRL2_SWITCH:
391 case WRL2NODES::WRL2_INLINE:
392 case WRL2NODES::WRL2_TRANSFORM:
394 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.
The top node of a VRML2 model.
bool ReadNode(WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode)
virtual bool isDangling(void)=0
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
std::list< WRL2NODE * > m_BackPointers
WRL2NODE * GetParent(void) const
virtual bool SetParent(WRL2NODE *aParent, bool doUnlink=true)
Set the parent WRL2NODE of this object.
std::list< WRL2NODE * > m_Children
virtual bool AddRefNode(WRL2NODE *aNode)
WRL2NODES GetNodeType(void) const
std::list< WRL2NODE * > m_Refs
virtual bool AddChildNode(WRL2NODE *aNode)
std::string GetFileName(void)
bool GetFilePosData(size_t &line, size_t &column)
std::string GetError(void)
bool ReadName(std::string &aName)
std::string GetFilePosition() const
bool ReadSFRotation(WRLROTATION &aSFRotation)
bool ReadSFVec3f(WRLVEC3F &aSFVec3f)
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)