50 wxT(
" * [INFO] Destroying Transform node with %zu children, %zu"
51 "references, and %zu back pointers." ),
82 wxCHECK_MSG( aTopNode,
false, wxT(
"Invalid top node." ) );
106 char tok = proc.
Peek();
111 " * [INFO] bad file format; unexpected eof %s." ),
121 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
132 if( proc.
Peek() ==
'}' )
142 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
154 if( !glob.compare(
"center" ) )
159 " * [INFO] invalid center %s\n"
160 " * [INFO] file: '%s'\n"
177 else if( !glob.compare(
"rotation" ) )
182 " * [INFO] invalid rotation %s\n"
183 " * [INFO] file: '%s'\n"
191 else if( !glob.compare(
"scale" ) )
196 " * [INFO] invalid scale %s\n"
197 " * [INFO] file: '%s'\n"
214 wxT(
" * [INFO] Detected top-level scale in VRML file, "
215 "disabling unit conversion." ) );
218 else if( !glob.compare(
"scaleOrientation" ) )
223 " * [INFO] invalid scaleOrientation %s\n"
224 " * [INFO] file: '%s'\n"
232 else if( !glob.compare(
"translation" ) )
237 " * [INFO] invalid translation %s\n"
238 " * [INFO] file: '%s'\n"
255 else if( !glob.compare(
"children" ) )
264 " * [INFO] invalid Transform %s.\n"
265 " * [INFO] file: '%s'\n" ),
280 const float tolerance = 0.001f;
282 return ( std::fabs(
scale.x - 1.0f ) > tolerance )
283 || ( std::fabs(
scale.y - 1.0f ) > tolerance )
284 || ( std::fabs(
scale.z - 1.0f ) > tolerance );
290 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
318 char tok = proc.
Peek();
323 " * [INFO] bad file format; unexpected eof %s." ),
332 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
335 if( proc.
Peek() ==
',' )
345 if( proc.
Peek() ==
']' )
351 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
354 if( proc.
Peek() ==
',' )
365 wxT(
" * [INFO] Translating Switch with %zu children, %zu references, and"
366 "%zu back pointers." ),
375 wxString::Format( wxT(
"Transform does not have a Transform parent (parent "
376 "ID: %d)." ), ptype ) );
380 if(
nullptr != aParent )
399 std::list< WRL2NODE* >::iterator sC =
m_Children.begin();
400 std::list< WRL2NODE* >::iterator eC =
m_Children.end();
410 for(
int i = 0; i < 2; ++i )
414 type = (*sC)->GetNodeType();
423 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)
void SetApplyUnitConversion(bool apply)
bool GetApplyUnitConversion(void) const
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)