36 m_Type = WRL2NODES::WRL2_COLOR;
42 m_Type = WRL2NODES::WRL2_COLOR;
52 wxLogTrace(
traceVrmlPlugin, wxT(
" * [INFO] Destroying Color node" ) );
69 wxCHECK_MSG(
false,
false, wxT(
"AddRefNode is not applicable." ) );
76 wxCHECK_MSG(
false,
false, wxT(
"AddChildNode is not applicable." ) );
82 char tok = proc.
Peek();
87 " * [INFO] bad file format; unexpected eof %s." ),
97 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
106 if( proc.
Peek() ==
'}' )
116 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
122 if( !glob.compare(
"color" ) )
127 " * [INFO] invalid color set %s\n"
128 " * [INFO] file: '%s'\n"
139 " * [INFO] invalid Color %s\n"
140 " * [INFO] file: '%s'\n" ),
146 if( proc.
Peek() ==
'}' )
153 " * [INFO] invalid Color %s (no closing brace)\n"
154 " * [INFO] file: '%s'\n" ),
179 if( aIndex < 0 || aIndex >= (
int)
colors.size() )
197 aColorList =
nullptr;
203 aListSize =
colors.size();
The base class of all Scene Graph nodes.
The top node of a VRML2 model.
bool Read(WRLPROC &proc, WRL2BASE *aTopNode) override
std::vector< WRLVEC3F > colors
void GetColor(int aIndex, float &red, float &green, float &blue)
Retrieve the given color (or default 0.8, 0.8, 0.8 if index is invalid).
bool AddChildNode(WRL2NODE *aNode) override
bool AddRefNode(WRL2NODE *aNode) override
bool isDangling(void) override
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
void GetColors(WRLVEC3F *&aColorList, size_t &aListSize)
Retrieve the current list of colors.
SGNODE * TranslateToSG(SGNODE *aParent) override
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg l...
WRL2NODES GetNodeType(void) const
virtual bool AddChildNode(WRL2NODE *aNode)
std::string GetFileName(void)
std::string GetError(void)
bool ReadMFVec3f(std::vector< WRLVEC3F > &aMFVec3f)
bool ReadName(std::string &aName)
std::string GetFilePosition() const
const wxChar *const traceVrmlPlugin
Flag to enable VRML plugin trace output.