40 m_Type = WRL2NODES::WRL2_APPEARANCE;
49 m_Type = WRL2NODES::WRL2_APPEARANCE;
60 wxT(
" * [INFO] Destroying Appearance node with %zu children, %zu"
61 "references, and %zu back pointers." ),
70 case WRL2NODES::WRL2_MATERIAL:
71 case WRL2NODES::WRL2_IMAGETEXTURE:
72 case WRL2NODES::WRL2_PIXELTEXTURE:
73 case WRL2NODES::WRL2_MOVIETEXTURE:
74 case WRL2NODES::WRL2_TEXTURETRANSFORM:
98 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
106 " * [INFO] bad file format; unexpected child node '%s'." ),
112 if( WRL2NODES::WRL2_MATERIAL == type )
118 " * [INFO] bad file format; multiple material nodes." ),
119 __FILE__, __FUNCTION__, __LINE__ );
128 if( WRL2NODES::WRL2_TEXTURETRANSFORM == type )
134 " * [INFO] bad file format; multiple textureTransform nodes." ),
135 __FILE__, __FUNCTION__, __LINE__ );
148 " * [INFO] bad file format; multiple texture nodes." ),
149 __FILE__, __FUNCTION__, __LINE__ );
161 wxCHECK_MSG( aNode,
false, wxT(
"Invalid node." ) );
169 " * [INFO] bad file format; unexpected child node '%s'." ),
175 if( WRL2NODES::WRL2_MATERIAL == type )
181 " * [INFO] bad file format; multiple material nodes." ),
182 __FILE__, __FUNCTION__, __LINE__ );
191 if( WRL2NODES::WRL2_TEXTURETRANSFORM == type )
197 " * [INFO] bad file format; multiple textureTransform nodes." ),
198 __FILE__, __FUNCTION__, __LINE__ );
211 " * [INFO] bad file format; multiple texture nodes." ),
212 __FILE__, __FUNCTION__, __LINE__ );
224 wxCHECK_MSG( aTopNode,
false, wxT(
"Invalid top node." ) );
226 char tok = proc.
Peek();
231 " * [INFO] bad file format; unexpected eof %s." ),
241 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
252 if( proc.
Peek() ==
'}' )
262 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
272 if( !glob.compare(
"material" ) )
274 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
278 " * [INFO] could not read material information." ),
279 __FILE__, __FUNCTION__, __LINE__ );
284 else if( !glob.compare(
"texture" ) )
286 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
290 " * [INFO] could not read texture information." ),
291 __FILE__, __FUNCTION__, __LINE__ );
296 else if( !glob.compare(
"textureTransform" ) )
298 if( !aTopNode->
ReadNode( proc,
this,
nullptr ) )
302 " * [INFO] could not read textureTransform information." ),
303 __FILE__, __FUNCTION__, __LINE__ );
311 " * [INFO] bad Appearance %s.\n"
312 " * [INFO] file: '%s'" ),
332 wxString::Format( wxT(
" * [BUG] Appearance does not have a Shape parent "
333 "(parent ID: %d)." ), ptype ) );
336 wxT(
" * [INFO] Translating Appearance node with %zu children, %zu"
337 "references, and %zu back pointers." ),
342 if(
nullptr != aParent )
383 if(
nullptr == aNode )
403 if(
nullptr == aNode )
bool SetDiffuse(float aRVal, float aGVal, float aBVal)
bool SetEmissive(float aRVal, float aGVal, float aBVal)
bool SetSpecular(float aRVal, float aGVal, float aBVal)
bool SetShininess(float aShininess) noexcept
bool SetTransparency(float aTransparency) noexcept
SGNODE * GetRawPtr(void) noexcept
Function GetRawPtr() returns the raw internal SGNODE pointer.
The base class of all Scene Graph nodes.
bool AddRefNode(WRL2NODE *aNode) override
bool checkNodeType(WRL2NODES aType)
Return true if the node type is a material description class.
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
WRL2NODE * textureTransform
void unlinkRefNode(const WRL2NODE *aNode) override
Remove pointers to a referenced node.
SGNODE * TranslateToSG(SGNODE *aParent) override
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
bool isDangling(void) override
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
virtual ~WRL2APPEARANCE()
void unlinkChildNode(const WRL2NODE *aNode) override
Remove references to an owned child.
bool AddChildNode(WRL2NODE *aNode) override
The top node of a VRML2 model.
bool ReadNode(WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode)
std::list< WRL2NODE * > m_BackPointers
WRL2NODE * GetParent(void) const
virtual void unlinkChildNode(const WRL2NODE *aNode)
Remove references to an owned child.
std::list< WRL2NODE * > m_Children
virtual SGNODE * TranslateToSG(SGNODE *aParent)=0
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
virtual bool AddRefNode(WRL2NODE *aNode)
virtual void unlinkRefNode(const WRL2NODE *aNode)
Remove pointers to a referenced node.
const char * GetNodeTypeName(WRL2NODES aNodeType) const
WRL2NODES GetNodeType(void) const
std::list< WRL2NODE * > m_Refs
virtual bool AddChildNode(WRL2NODE *aNode)
std::string GetFileName(void)
std::string GetError(void)
bool ReadName(std::string &aName)
std::string GetFilePosition() const
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)