KiCad PCB EDA Suite
|
The base class of all X3D nodes. More...
#include <x3d_base.h>
Public Member Functions | |
virtual void | unlinkChildNode (const X3DNODE *aNode) |
Remove references to an owned child; it is invoked by the child upon destruction to ensure that the parent has no invalid references. | |
virtual void | unlinkRefNode (const X3DNODE *aNode) |
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. | |
void | addNodeRef (X3DNODE *aNode) |
Add a pointer to a node which references, but does not own, this node. | |
void | delNodeRef (X3DNODE *aNode) |
Remove a pointer to a node which references, but does not own, this node. | |
X3DNODE () | |
virtual | ~X3DNODE () |
virtual bool | Read (wxXmlNode *aNode, X3DNODE *aTopNode, X3D_DICT &aDict)=0 |
X3DNODES | GetNodeType (void) const |
Return the type of this node instance. | |
X3DNODE * | GetParent (void) const |
Return a pointer to the parent node of this object or NULL if the object has no parent (ie. | |
wxString | GetName (void) const |
Return the name of this object. | |
virtual bool | SetParent (X3DNODE *aParent, bool doUnlink=true)=0 |
Set the parent X3DNODE of this object. | |
virtual bool | AddChildNode (X3DNODE *aNode)=0 |
virtual bool | AddRefNode (X3DNODE *aNode)=0 |
std::string | GetError (void) |
virtual SGNODE * | TranslateToSG (SGNODE *aParent)=0 |
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg library. | |
Protected Attributes | |
X3DNODE * | m_Parent |
X3DNODES | m_Type |
X3D_DICT * | m_Dict |
std::list< X3DNODE * > | m_BackPointers |
std::list< X3DNODE * > | m_Children |
std::list< X3DNODE * > | m_Refs |
std::string | m_error |
wxString | m_Name |
SGNODE * | m_sgNode |
The base class of all X3D nodes.
Definition at line 74 of file x3d_base.h.
X3DNODE::X3DNODE | ( | ) |
Definition at line 82 of file x3d_base.cpp.
References m_Dict, m_Parent, m_sgNode, m_Type, and X3D_INVALID.
|
virtual |
Definition at line 93 of file x3d_base.cpp.
References X3D_DICT::DelName(), m_Dict, and m_Name.
|
pure virtual |
Implemented in X3DAPP, X3DCOORDS, X3DIFACESET, X3DSHAPE, and X3DTRANSFORM.
Referenced by X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), X3DTRANSFORM::SetParent(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM::X3DTRANSFORM().
void X3DNODE::addNodeRef | ( | X3DNODE * | aNode | ) |
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 142 of file x3d_base.cpp.
References m_BackPointers, and m_Parent.
Referenced by X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), and X3DTRANSFORM::AddRefNode().
|
pure virtual |
Implemented in X3DAPP, X3DCOORDS, X3DIFACESET, X3DSHAPE, and X3DTRANSFORM.
Referenced by X3D::ReadAppearance(), X3D::ReadCoordinates(), X3D::ReadIndexedFaceSet(), X3D::ReadShape(), and X3D::ReadTransform().
void X3DNODE::delNodeRef | ( | X3DNODE * | aNode | ) |
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 165 of file x3d_base.cpp.
References m_BackPointers, and traceVrmlPlugin.
std::string X3DNODE::GetError | ( | void | ) |
Definition at line 202 of file x3d_base.cpp.
References m_error.
wxString X3DNODE::GetName | ( | void | ) | const |
X3DNODES X3DNODE::GetNodeType | ( | void | ) | const |
Return the type of this node instance.
Definition at line 184 of file x3d_base.cpp.
References m_Type.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), X3DTRANSFORM::AddChildNode(), X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), X3DTRANSFORM::AddRefNode(), X3DAPP::readFields(), X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), X3DTRANSFORM::SetParent(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM::X3DTRANSFORM().
X3DNODE * X3DNODE::GetParent | ( | void | ) | const |
Return a pointer to the parent node of this object or NULL if the object has no parent (ie.
top level transform).
Definition at line 190 of file x3d_base.cpp.
References m_Parent.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), and X3DTRANSFORM::AddChildNode().
Implemented in X3DAPP, X3DCOORDS, X3DIFACESET, X3DSHAPE, and X3DTRANSFORM.
Referenced by X3D::ReadAppearance(), X3D::ReadCoordinates(), X3D::ReadIndexedFaceSet(), X3D::ReadShape(), and X3D::ReadTransform().
|
pure virtual |
Set the parent X3DNODE of this object.
aParent | [in] is the desired parent node. |
doUnlink | indicates that the child must be unlinked from the parent |
Implemented in X3DAPP, X3DCOORDS, X3DIFACESET, X3DSHAPE, and X3DTRANSFORM.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), and X3DTRANSFORM::AddChildNode().
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/ |
Implemented in X3DAPP, X3DCOORDS, X3DIFACESET, X3DSHAPE, and X3DTRANSFORM.
Referenced by X3DPARSER::Load(), and X3DSHAPE::TranslateToSG().
|
virtual |
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 X3DSHAPE.
Definition at line 102 of file x3d_base.cpp.
References m_Children.
Referenced by X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), X3DTRANSFORM::SetParent(), and X3DSHAPE::unlinkChildNode().
|
virtual |
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 X3DSHAPE.
Definition at line 122 of file x3d_base.cpp.
References m_Refs.
Referenced by X3DSHAPE::unlinkRefNode().
|
protected |
Definition at line 163 of file x3d_base.h.
Referenced by addNodeRef(), delNodeRef(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), X3DTRANSFORM::TranslateToSG(), X3DSHAPE::~X3DSHAPE(), and X3DTRANSFORM::~X3DTRANSFORM().
|
protected |
Definition at line 164 of file x3d_base.h.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), X3DTRANSFORM::AddChildNode(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), X3DTRANSFORM::TranslateToSG(), unlinkChildNode(), X3DSHAPE::~X3DSHAPE(), and X3DTRANSFORM::~X3DTRANSFORM().
|
protected |
Definition at line 161 of file x3d_base.h.
Referenced by X3DAPP::Read(), X3DCOORDS::Read(), X3DIFACESET::Read(), X3DSHAPE::Read(), X3DTRANSFORM::Read(), X3DAPP::readFields(), X3DIFACESET::readFields(), X3DTRANSFORM::readFields(), X3DNODE(), X3DAPP::~X3DAPP(), and ~X3DNODE().
|
protected |
Definition at line 166 of file x3d_base.h.
Referenced by GetError().
|
protected |
Definition at line 168 of file x3d_base.h.
Referenced by GetName(), X3DAPP::Read(), X3DCOORDS::Read(), X3DSHAPE::Read(), X3DIFACESET::readFields(), X3DTRANSFORM::readFields(), and ~X3DNODE().
|
protected |
Definition at line 159 of file x3d_base.h.
Referenced by addNodeRef(), GetParent(), X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), X3DTRANSFORM::SetParent(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DNODE(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM::X3DTRANSFORM().
|
protected |
Definition at line 165 of file x3d_base.h.
Referenced by X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), X3DTRANSFORM::AddRefNode(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), X3DTRANSFORM::TranslateToSG(), unlinkRefNode(), X3DSHAPE::~X3DSHAPE(), and X3DTRANSFORM::~X3DTRANSFORM().
|
protected |
Definition at line 169 of file x3d_base.h.
Referenced by X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), X3DTRANSFORM::TranslateToSG(), and X3DNODE().
|
protected |
Definition at line 160 of file x3d_base.h.
Referenced by GetNodeType(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DNODE(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM::X3DTRANSFORM().