KiCad PCB EDA Suite
|
The top node of a VRML2 model. More...
#include <vrml2_base.h>
Public Member Functions | |
WRL2BASE () | |
virtual | ~WRL2BASE () |
void | SetEnableInline (bool enable) |
bool | GetEnableInline (void) |
SGNODE * | GetInlineData (const std::string &aName) |
bool | Read (WRLPROC &proc) |
bool | ReadNode (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
virtual std::string | GetName (void) override |
virtual bool | SetName (const std::string &aName) override |
bool | Read (WRLPROC &proc, WRL2BASE *aTopNode) override |
bool | SetParent (WRL2NODE *aParent, bool doUnlink=true) override |
Set the parent WRL2NODE of this object. | |
SGNODE * | TranslateToSG (SGNODE *aParent) override |
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg library. | |
bool | isDangling (void) override |
Determine whether an object should be moved to a different parent during the VRML to SG* translation. | |
WRL2NODES | GetNodeType (void) const |
WRL2NODE * | GetParent (void) const |
const char * | GetNodeTypeName (WRL2NODES aNodeType) const |
virtual WRL2NODE * | FindNode (const std::string &aNodeName, const WRL2NODE *aCaller) |
Search the tree of linked nodes and returns a reference to the first node found with the given name. | |
virtual bool | AddChildNode (WRL2NODE *aNode) |
virtual bool | AddRefNode (WRL2NODE *aNode) |
std::string | GetError (void) |
WRL2NODES | getNodeTypeID (const std::string &aNodeName) |
virtual void | unlinkChildNode (const WRL2NODE *aNode) |
Remove references to an owned child. | |
virtual void | unlinkRefNode (const WRL2NODE *aNode) |
Remove pointers to a referenced node. | |
void | addNodeRef (WRL2NODE *aNode) |
Add a pointer to a node which references but does not own this node. | |
void | delNodeRef (WRL2NODE *aNode) |
Remove a pointer to a node which references but does not own this node. | |
Protected Attributes | |
WRL2NODE * | m_Parent |
WRL2NODES | m_Type |
std::string | m_Name |
std::list< WRL2NODE * > | m_BackPointers |
std::list< WRL2NODE * > | m_Children |
std::list< WRL2NODE * > | m_Refs |
std::string | m_error |
SGNODE * | m_sgNode |
Private Member Functions | |
bool | implementUse (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | implementDef (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readTransform (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readShape (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readAppearance (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readMaterial (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readFaceSet (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readLineSet (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readPointSet (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readCoords (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readNorms (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readColor (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readBox (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readSwitch (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
bool | readInline (WRLPROC &proc, WRL2NODE *aParent, WRL2NODE **aNode) |
Private Attributes | |
bool | m_useInline |
std::string | m_dir |
std::map< std::string, SGNODE * > | m_inlineModels |
The top node of a VRML2 model.
Definition at line 59 of file vrml2_base.h.
WRL2BASE::WRL2BASE | ( | ) |
Definition at line 53 of file vrml2_base.cpp.
References WRL2NODE::m_Type, and m_useInline.
|
virtual |
Definition at line 60 of file vrml2_base.cpp.
References S3D::DestroyNode(), S3D::GetSGNodeParent(), and m_inlineModels.
|
virtualinherited |
Reimplemented in WRL2APPEARANCE, WRL2BOX, WRL2COLOR, WRL2COORDS, WRL2FACESET, WRL2INLINE, WRL2LINESET, WRL2MATERIAL, WRL2NORMS, WRL2POINTSET, and WRL2SHAPE.
Definition at line 356 of file vrml2_node.cpp.
References WRL2NODE::GetNodeType(), WRL2NODE::GetParent(), WRL2NODE::m_Children, and WRL2NODE::SetParent().
Referenced by WRL2APPEARANCE::AddChildNode(), WRL2FACESET::AddChildNode(), WRL2LINESET::AddChildNode(), WRL2POINTSET::AddChildNode(), WRL2SHAPE::AddChildNode(), WRL2SWITCH::AddRefNode(), WRL2TRANSFORM::AddRefNode(), WRL2NODE::SetParent(), WRL2APPEARANCE::WRL2APPEARANCE(), WRL2BOX::WRL2BOX(), WRL2COLOR::WRL2COLOR(), WRL2COORDS::WRL2COORDS(), WRL2FACESET::WRL2FACESET(), WRL2INLINE::WRL2INLINE(), WRL2LINESET::WRL2LINESET(), WRL2MATERIAL::WRL2MATERIAL(), WRL2NORMS::WRL2NORMS(), WRL2POINTSET::WRL2POINTSET(), WRL2SHAPE::WRL2SHAPE(), WRL2SWITCH::WRL2SWITCH(), and WRL2TRANSFORM::WRL2TRANSFORM().
|
inherited |
Add a pointer to a node which references but does not own this node.
Such back-pointers are required to ensure that invalidated references are removed when a node is deleted.
aNode | is the node holding a reference to this object. |
Definition at line 171 of file vrml2_node.cpp.
References WRL2NODE::m_BackPointers, and WRL2NODE::m_Parent.
Referenced by WRL2NODE::AddRefNode().
|
virtualinherited |
Reimplemented in WRL2APPEARANCE, WRL2BOX, WRL2COLOR, WRL2COORDS, WRL2FACESET, WRL2INLINE, WRL2LINESET, WRL2MATERIAL, WRL2NORMS, WRL2POINTSET, WRL2SHAPE, WRL2SWITCH, and WRL2TRANSFORM.
Definition at line 383 of file vrml2_node.cpp.
References WRL2NODE::addNodeRef(), WRL2NODE::GetNodeType(), and WRL2NODE::m_Refs.
Referenced by WRL2APPEARANCE::AddRefNode(), WRL2FACESET::AddRefNode(), WRL2LINESET::AddRefNode(), WRL2POINTSET::AddRefNode(), WRL2SHAPE::AddRefNode(), WRL2SWITCH::AddRefNode(), WRL2TRANSFORM::AddRefNode(), and implementUse().
|
inherited |
Remove a pointer to a node which references but does not own this node.
aNode | is the node holding a reference to this object |
Definition at line 187 of file vrml2_node.cpp.
References WRL2NODE::m_BackPointers, and traceVrmlPlugin.
|
virtualinherited |
Search the tree of linked nodes and returns a reference to the first node found with the given name.
The reference is then typically added to another node via AddRefNode().
aNodeName | is the name of the node to search for. |
aCaller | is a pointer to the node invoking this function. |
Definition at line 305 of file vrml2_node.cpp.
References WRL2NODE::FindNode(), WRL2NODE::m_Children, WRL2NODE::m_Name, and WRL2NODE::m_Parent.
Referenced by WRL2NODE::FindNode(), and implementUse().
bool WRL2BASE::GetEnableInline | ( | void | ) |
Definition at line 92 of file vrml2_base.cpp.
References m_useInline.
|
inherited |
Definition at line 299 of file vrml2_node.cpp.
References WRL2NODE::m_error.
SGNODE * WRL2BASE::GetInlineData | ( | const std::string & | aName | ) |
Definition at line 98 of file vrml2_base.cpp.
References FN_NORMALIZE_FLAGS, LoadVRML(), m_dir, and m_inlineModels.
Referenced by WRL2INLINE::TranslateToSG().
|
overridevirtual |
Reimplemented from WRL2NODE.
Definition at line 152 of file vrml2_base.cpp.
|
inherited |
Definition at line 204 of file vrml2_node.cpp.
References WRL2NODE::m_Type.
Referenced by WRL2NODE::AddChildNode(), WRL2APPEARANCE::AddChildNode(), WRL2FACESET::AddChildNode(), WRL2LINESET::AddChildNode(), WRL2POINTSET::AddChildNode(), WRL2SHAPE::AddChildNode(), WRL2NODE::AddRefNode(), WRL2APPEARANCE::AddRefNode(), WRL2FACESET::AddRefNode(), WRL2LINESET::AddRefNode(), WRL2POINTSET::AddRefNode(), WRL2SHAPE::AddRefNode(), WRL2SWITCH::AddRefNode(), WRL2TRANSFORM::AddRefNode(), implementUse(), WRL2APPEARANCE::isDangling(), WRL2BOX::isDangling(), WRL2COLOR::isDangling(), WRL2COORDS::isDangling(), WRL2FACESET::isDangling(), WRL2LINESET::isDangling(), WRL2MATERIAL::isDangling(), WRL2NORMS::isDangling(), WRL2POINTSET::isDangling(), WRL2SHAPE::isDangling(), WRL2INLINE::Read(), and WRL2SHAPE::TranslateToSG().
|
inherited |
Definition at line 288 of file vrml2_node.cpp.
References nodenames.
Referenced by ReadNode().
|
inherited |
Definition at line 273 of file vrml2_node.cpp.
References nodenames.
Referenced by WRL2APPEARANCE::AddChildNode(), WRL2FACESET::AddChildNode(), WRL2LINESET::AddChildNode(), WRL2POINTSET::AddChildNode(), WRL2SHAPE::AddChildNode(), WRL2APPEARANCE::AddRefNode(), WRL2FACESET::AddRefNode(), WRL2LINESET::AddRefNode(), WRL2POINTSET::AddRefNode(), and WRL2SHAPE::AddRefNode().
|
inherited |
Definition at line 210 of file vrml2_node.cpp.
References WRL2NODE::m_Parent.
Referenced by WRL2NODE::AddChildNode(), WRL2SWITCH::AddRefNode(), WRL2TRANSFORM::AddRefNode(), WRL2APPEARANCE::unlinkChildNode(), WRL2FACESET::unlinkChildNode(), WRL2LINESET::unlinkChildNode(), WRL2POINTSET::unlinkChildNode(), WRL2APPEARANCE::unlinkRefNode(), WRL2FACESET::unlinkRefNode(), WRL2LINESET::unlinkRefNode(), and WRL2POINTSET::unlinkRefNode().
Definition at line 236 of file vrml2_base.cpp.
References WRLPROC::GetError(), WRLPROC::GetFilePosition(), WRLPROC::ReadName(), ReadNode(), WRL2NODE::SetName(), and traceVrmlPlugin.
Referenced by ReadNode().
Definition at line 188 of file vrml2_base.cpp.
References WRL2NODE::AddRefNode(), WRL2NODE::FindNode(), WRLPROC::GetError(), WRL2NODE::GetNodeType(), WRLPROC::ReadName(), and traceVrmlPlugin.
Referenced by ReadNode().
|
overridevirtual |
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
Implements WRL2NODE.
Definition at line 181 of file vrml2_base.cpp.
bool WRL2BASE::Read | ( | WRLPROC & | proc | ) |
Definition at line 164 of file vrml2_base.cpp.
References WRLPROC::eof(), WRLPROC::GetParentDir(), WRLPROC::GetVRMLType(), m_dir, and ReadNode().
Referenced by LoadVRML().
Implements WRL2NODE.
Definition at line 633 of file vrml2_base.cpp.
Definition at line 679 of file vrml2_base.cpp.
References WRL2APPEARANCE::Read().
Referenced by ReadNode().
Definition at line 839 of file vrml2_base.cpp.
References WRL2BOX::Read().
Referenced by ReadNode().
Definition at line 819 of file vrml2_base.cpp.
References WRL2COLOR::Read().
Referenced by ReadNode().
Definition at line 779 of file vrml2_base.cpp.
References WRL2COORDS::Read().
Referenced by ReadNode().
Definition at line 719 of file vrml2_base.cpp.
References WRL2FACESET::Read().
Referenced by ReadNode().
Definition at line 879 of file vrml2_base.cpp.
References WRLPROC::DiscardNode(), WRLPROC::GetFilePosition(), m_useInline, WRL2INLINE::Read(), and traceVrmlPlugin.
Referenced by ReadNode().
Definition at line 739 of file vrml2_base.cpp.
References WRL2LINESET::Read().
Referenced by ReadNode().
Definition at line 699 of file vrml2_base.cpp.
References WRL2MATERIAL::Read().
Referenced by ReadNode().
Definition at line 277 of file vrml2_base.cpp.
References WRLPROC::DiscardList(), WRLPROC::DiscardNode(), WRLPROC::GetError(), WRLPROC::GetFilePosition(), WRL2NODE::getNodeTypeID(), implementDef(), implementUse(), readAppearance(), readBox(), readColor(), readCoords(), readFaceSet(), WRLPROC::ReadGlob(), readInline(), readLineSet(), readMaterial(), WRLPROC::ReadName(), readNorms(), readPointSet(), readShape(), readSwitch(), readTransform(), and traceVrmlPlugin.
Referenced by implementDef(), Read(), WRL2APPEARANCE::Read(), WRL2FACESET::Read(), WRL2LINESET::Read(), WRL2POINTSET::Read(), WRL2SHAPE::Read(), WRL2SWITCH::readChildren(), and WRL2TRANSFORM::readChildren().
Definition at line 799 of file vrml2_base.cpp.
References WRL2NORMS::Read().
Referenced by ReadNode().
Definition at line 759 of file vrml2_base.cpp.
References WRL2POINTSET::Read().
Referenced by ReadNode().
Definition at line 659 of file vrml2_base.cpp.
References WRL2SHAPE::Read().
Referenced by ReadNode().
Definition at line 859 of file vrml2_base.cpp.
References WRL2SWITCH::Read().
Referenced by ReadNode().
Definition at line 639 of file vrml2_base.cpp.
References WRL2TRANSFORM::Read().
Referenced by ReadNode().
void WRL2BASE::SetEnableInline | ( | bool | enable | ) |
|
overridevirtual |
Reimplemented from WRL2NODE.
Definition at line 158 of file vrml2_base.cpp.
|
overridevirtual |
Set the parent WRL2NODE of this object.
aParent | [in] is the desired parent node. |
doUnlink | indicates that the child must be unlinked from the parent |
Reimplemented from WRL2NODE.
Definition at line 80 of file vrml2_base.cpp.
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg library.
aParent | is a pointer to the parent SG node. |
Implements WRL2NODE.
Definition at line 912 of file vrml2_base.cpp.
References S3D::AddSGNodeChild(), S3D::AddSGNodeRef(), IFSG_NODE::Destroy(), IFSG_NODE::GetRawPtr(), S3D::GetSGNodeParent(), WRL2NODE::m_Children, and WRL2NODE::m_sgNode.
Referenced by LoadVRML().
|
virtualinherited |
Remove references to an owned child.
It is invoked by the child upon destruction to ensure that the parent has no invalid references.
aNode | is the child which is being deleted. |
Reimplemented in WRL2APPEARANCE, WRL2FACESET, WRL2LINESET, WRL2POINTSET, and WRL2SHAPE.
Definition at line 407 of file vrml2_node.cpp.
References WRL2NODE::m_Children.
Referenced by WRL2NODE::SetParent(), WRL2APPEARANCE::unlinkChildNode(), WRL2FACESET::unlinkChildNode(), WRL2LINESET::unlinkChildNode(), WRL2POINTSET::unlinkChildNode(), WRL2SHAPE::unlinkChildNode(), and WRL2NODE::~WRL2NODE().
|
virtualinherited |
Remove pointers to a referenced node.
It is invoked by the referenced node upon destruction to ensure that the referring node has no invalid references.
aNode | is the node which is being deleted. |
Reimplemented in WRL2APPEARANCE, WRL2FACESET, WRL2LINESET, WRL2POINTSET, and WRL2SHAPE.
Definition at line 425 of file vrml2_node.cpp.
References WRL2NODE::m_Refs.
Referenced by WRL2APPEARANCE::unlinkRefNode(), WRL2FACESET::unlinkRefNode(), WRL2LINESET::unlinkRefNode(), WRL2POINTSET::unlinkRefNode(), and WRL2SHAPE::unlinkRefNode().
|
protectedinherited |
Definition at line 173 of file vrml2_node.h.
Referenced by WRL2NODE::addNodeRef(), WRL2NODE::delNodeRef(), WRL2APPEARANCE::TranslateToSG(), WRL2FACESET::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2APPEARANCE::~WRL2APPEARANCE(), WRL2FACESET::~WRL2FACESET(), WRL2LINESET::~WRL2LINESET(), WRL2NODE::~WRL2NODE(), WRL2POINTSET::~WRL2POINTSET(), WRL2SHAPE::~WRL2SHAPE(), WRL2SWITCH::~WRL2SWITCH(), and WRL2TRANSFORM::~WRL2TRANSFORM().
|
protectedinherited |
Definition at line 174 of file vrml2_node.h.
Referenced by WRL2NODE::AddChildNode(), WRL2NODE::FindNode(), WRL2APPEARANCE::TranslateToSG(), TranslateToSG(), WRL2FACESET::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2NODE::unlinkChildNode(), WRL2APPEARANCE::~WRL2APPEARANCE(), WRL2FACESET::~WRL2FACESET(), WRL2LINESET::~WRL2LINESET(), WRL2NODE::~WRL2NODE(), WRL2POINTSET::~WRL2POINTSET(), WRL2SHAPE::~WRL2SHAPE(), WRL2SWITCH::~WRL2SWITCH(), and WRL2TRANSFORM::~WRL2TRANSFORM().
|
private |
Definition at line 107 of file vrml2_base.h.
Referenced by GetInlineData(), and Read().
|
protectedinherited |
Definition at line 176 of file vrml2_node.h.
Referenced by WRL2NODE::GetError().
|
private |
Definition at line 108 of file vrml2_base.h.
Referenced by GetInlineData(), and ~WRL2BASE().
|
protectedinherited |
Definition at line 171 of file vrml2_node.h.
Referenced by WRL2NODE::FindNode(), WRL2NODE::GetName(), and WRL2NODE::SetName().
|
protectedinherited |
Definition at line 169 of file vrml2_node.h.
Referenced by WRL2NODE::addNodeRef(), WRL2NODE::FindNode(), WRL2NODE::GetParent(), WRL2APPEARANCE::isDangling(), WRL2BOX::isDangling(), WRL2COLOR::isDangling(), WRL2COORDS::isDangling(), WRL2FACESET::isDangling(), WRL2LINESET::isDangling(), WRL2MATERIAL::isDangling(), WRL2NORMS::isDangling(), WRL2POINTSET::isDangling(), WRL2SHAPE::isDangling(), WRL2NODE::SetParent(), WRL2APPEARANCE::WRL2APPEARANCE(), WRL2BOX::WRL2BOX(), WRL2COLOR::WRL2COLOR(), WRL2COORDS::WRL2COORDS(), WRL2FACESET::WRL2FACESET(), WRL2INLINE::WRL2INLINE(), WRL2LINESET::WRL2LINESET(), WRL2MATERIAL::WRL2MATERIAL(), WRL2NODE::WRL2NODE(), WRL2NORMS::WRL2NORMS(), WRL2POINTSET::WRL2POINTSET(), WRL2SHAPE::WRL2SHAPE(), WRL2SWITCH::WRL2SWITCH(), WRL2TRANSFORM::WRL2TRANSFORM(), and WRL2NODE::~WRL2NODE().
|
protectedinherited |
Definition at line 175 of file vrml2_node.h.
Referenced by WRL2NODE::AddRefNode(), WRL2APPEARANCE::TranslateToSG(), WRL2FACESET::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2NODE::unlinkRefNode(), WRL2APPEARANCE::~WRL2APPEARANCE(), WRL2FACESET::~WRL2FACESET(), WRL2LINESET::~WRL2LINESET(), WRL2NODE::~WRL2NODE(), WRL2POINTSET::~WRL2POINTSET(), WRL2SHAPE::~WRL2SHAPE(), WRL2SWITCH::~WRL2SWITCH(), and WRL2TRANSFORM::~WRL2TRANSFORM().
|
protectedinherited |
Definition at line 178 of file vrml2_node.h.
Referenced by WRL2APPEARANCE::TranslateToSG(), TranslateToSG(), WRL2BOX::TranslateToSG(), WRL2FACESET::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), and WRL2NODE::WRL2NODE().
|
protectedinherited |
Definition at line 170 of file vrml2_node.h.
Referenced by WRL2NODE::GetNodeType(), WRL2APPEARANCE::WRL2APPEARANCE(), WRL2BASE(), WRL2BOX::WRL2BOX(), WRL2COLOR::WRL2COLOR(), WRL2COORDS::WRL2COORDS(), WRL2FACESET::WRL2FACESET(), WRL2INLINE::WRL2INLINE(), WRL2LINESET::WRL2LINESET(), WRL2MATERIAL::WRL2MATERIAL(), WRL2NODE::WRL2NODE(), WRL2NORMS::WRL2NORMS(), WRL2POINTSET::WRL2POINTSET(), WRL2SHAPE::WRL2SHAPE(), WRL2SWITCH::WRL2SWITCH(), and WRL2TRANSFORM::WRL2TRANSFORM().
|
private |
Definition at line 106 of file vrml2_base.h.
Referenced by GetEnableInline(), readInline(), SetEnableInline(), and WRL2BASE().