KiCad PCB EDA Suite
|
#include <x3d_transform.h>
Public Member Functions | |
X3DTRANSFORM () | |
X3DTRANSFORM (X3DNODE *aParent) | |
virtual | ~X3DTRANSFORM () |
bool | Read (wxXmlNode *aNode, X3DNODE *aTopNode, X3D_DICT &aDict) override |
bool | SetParent (X3DNODE *aParent, bool doUnlink=true) override |
Set the parent X3DNODE of this object. | |
bool | AddChildNode (X3DNODE *aNode) override |
bool | AddRefNode (X3DNODE *aNode) override |
SGNODE * | TranslateToSG (SGNODE *aParent) override |
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg library. | |
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. | |
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. | |
std::string | GetError (void) |
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 |
Private Member Functions | |
void | init () |
void | readFields (wxXmlNode *aNode) |
Private Attributes | |
WRLVEC3F | center |
WRLVEC3F | scale |
WRLVEC3F | translation |
WRLROTATION | rotation |
WRLROTATION | scaleOrientation |
WRLVEC3F | bboxCenter |
WRLVEC3F | bboxSize |
Definition at line 39 of file x3d_transform.h.
X3DTRANSFORM::X3DTRANSFORM | ( | ) |
Definition at line 35 of file x3d_transform.cpp.
References init(), X3DNODE::m_Type, and X3D_TRANSFORM.
X3DTRANSFORM::X3DTRANSFORM | ( | X3DNODE * | aParent | ) |
Definition at line 42 of file x3d_transform.cpp.
References X3DNODE::AddChildNode(), X3DNODE::GetNodeType(), init(), X3DNODE::m_Parent, X3DNODE::m_Type, X3D_SWITCH, and X3D_TRANSFORM.
|
virtual |
Definition at line 60 of file x3d_transform.cpp.
References X3DNODE::m_BackPointers, X3DNODE::m_Children, X3DNODE::m_Refs, and traceVrmlPlugin.
|
overridevirtual |
Implements X3DNODE.
Definition at line 201 of file x3d_transform.cpp.
References X3DNODE::GetNodeType(), X3DNODE::GetParent(), X3DNODE::m_Children, X3DNODE::SetParent(), X3D_SHAPE, X3D_SWITCH, and X3D_TRANSFORM.
|
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 142 of file x3d_base.cpp.
References X3DNODE::m_BackPointers, and X3DNODE::m_Parent.
Referenced by X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), and AddRefNode().
|
overridevirtual |
Implements X3DNODE.
Definition at line 231 of file x3d_transform.cpp.
References X3DNODE::addNodeRef(), X3DNODE::GetNodeType(), X3DNODE::m_Refs, X3D_SHAPE, X3D_SWITCH, and X3D_TRANSFORM.
|
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 165 of file x3d_base.cpp.
References X3DNODE::m_BackPointers, and traceVrmlPlugin.
|
inherited |
Definition at line 202 of file x3d_base.cpp.
References X3DNODE::m_error.
|
inherited |
Return the name of this object.
Definition at line 196 of file x3d_base.cpp.
References X3DNODE::m_Name.
|
inherited |
Return the type of this node instance.
Definition at line 184 of file x3d_base.cpp.
References X3DNODE::m_Type.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), AddChildNode(), X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), AddRefNode(), X3DAPP::readFields(), X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), SetParent(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM().
|
inherited |
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 X3DNODE::m_Parent.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), and AddChildNode().
|
private |
Definition at line 69 of file x3d_transform.cpp.
References bboxCenter, bboxSize, center, rotation, scale, scaleOrientation, and translation.
Referenced by X3DTRANSFORM().
Implements X3DNODE.
Definition at line 144 of file x3d_transform.cpp.
References X3DNODE::m_Dict, name, readFields(), X3D::ReadShape(), X3D::ReadSwitch(), X3D::ReadTransform(), and SetParent().
|
private |
Definition at line 92 of file x3d_transform.cpp.
References X3D_DICT::AddName(), center, X3DNODE::m_Dict, X3DNODE::m_Name, X3D::ParseSFRotation(), X3D::ParseSFVec3(), rotation, scale, scaleOrientation, and translation.
Referenced by Read().
|
overridevirtual |
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 |
Implements X3DNODE.
Definition at line 176 of file x3d_transform.cpp.
References X3DNODE::AddChildNode(), X3DNODE::GetNodeType(), X3DNODE::m_Parent, X3DNODE::unlinkChildNode(), X3D_SWITCH, and X3D_TRANSFORM.
Referenced by Read().
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 X3DNODE.
Definition at line 259 of file x3d_transform.cpp.
References S3D::AddSGNodeChild(), S3D::AddSGNodeRef(), center, IFSG_NODE::Destroy(), IFSG_NODE::GetRawPtr(), S3D::GetSGNodeParent(), S3D::GetSGNodeType(), X3DNODE::m_BackPointers, X3DNODE::m_Children, X3DNODE::m_Refs, X3DNODE::m_sgNode, rotation, scale, scaleOrientation, IFSG_TRANSFORM::SetCenter(), IFSG_TRANSFORM::SetRotation(), IFSG_TRANSFORM::SetScale(), IFSG_TRANSFORM::SetScaleOrientation(), IFSG_TRANSFORM::SetTranslation(), S3D::SGTYPE_TRANSFORM, traceVrmlPlugin, translation, X3D_SHAPE, X3D_SWITCH, and X3D_TRANSFORM.
|
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 X3DSHAPE.
Definition at line 102 of file x3d_base.cpp.
References X3DNODE::m_Children.
Referenced by X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), SetParent(), and X3DSHAPE::unlinkChildNode().
|
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 X3DSHAPE.
Definition at line 122 of file x3d_base.cpp.
References X3DNODE::m_Refs.
Referenced by X3DSHAPE::unlinkRefNode().
|
private |
Definition at line 61 of file x3d_transform.h.
Referenced by init().
|
private |
Definition at line 62 of file x3d_transform.h.
Referenced by init().
|
private |
Definition at line 56 of file x3d_transform.h.
Referenced by init(), readFields(), and TranslateToSG().
|
protectedinherited |
Definition at line 163 of file x3d_base.h.
Referenced by X3DNODE::addNodeRef(), X3DNODE::delNodeRef(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), TranslateToSG(), X3DSHAPE::~X3DSHAPE(), and ~X3DTRANSFORM().
|
protectedinherited |
Definition at line 164 of file x3d_base.h.
Referenced by X3DIFACESET::AddChildNode(), X3DSHAPE::AddChildNode(), AddChildNode(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), TranslateToSG(), X3DNODE::unlinkChildNode(), X3DSHAPE::~X3DSHAPE(), and ~X3DTRANSFORM().
|
protectedinherited |
Definition at line 161 of file x3d_base.h.
Referenced by X3DAPP::Read(), X3DCOORDS::Read(), X3DIFACESET::Read(), X3DSHAPE::Read(), Read(), X3DAPP::readFields(), X3DIFACESET::readFields(), readFields(), X3DNODE::X3DNODE(), X3DAPP::~X3DAPP(), and X3DNODE::~X3DNODE().
|
protectedinherited |
Definition at line 166 of file x3d_base.h.
Referenced by X3DNODE::GetError().
|
protectedinherited |
Definition at line 168 of file x3d_base.h.
Referenced by X3DNODE::GetName(), X3DAPP::Read(), X3DCOORDS::Read(), X3DSHAPE::Read(), X3DIFACESET::readFields(), readFields(), and X3DNODE::~X3DNODE().
|
protectedinherited |
Definition at line 159 of file x3d_base.h.
Referenced by X3DNODE::addNodeRef(), X3DNODE::GetParent(), X3DAPP::SetParent(), X3DCOORDS::SetParent(), X3DIFACESET::SetParent(), X3DSHAPE::SetParent(), SetParent(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DNODE::X3DNODE(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM().
|
protectedinherited |
Definition at line 165 of file x3d_base.h.
Referenced by X3DIFACESET::AddRefNode(), X3DSHAPE::AddRefNode(), AddRefNode(), X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), TranslateToSG(), X3DNODE::unlinkRefNode(), X3DSHAPE::~X3DSHAPE(), and ~X3DTRANSFORM().
|
protectedinherited |
Definition at line 169 of file x3d_base.h.
Referenced by X3DAPP::TranslateToSG(), X3DIFACESET::TranslateToSG(), X3DSHAPE::TranslateToSG(), TranslateToSG(), and X3DNODE::X3DNODE().
|
protectedinherited |
Definition at line 160 of file x3d_base.h.
Referenced by X3DNODE::GetNodeType(), X3DAPP::X3DAPP(), X3DCOORDS::X3DCOORDS(), X3DIFACESET::X3DIFACESET(), X3DNODE::X3DNODE(), X3DSHAPE::X3DSHAPE(), and X3DTRANSFORM().
|
private |
Definition at line 59 of file x3d_transform.h.
Referenced by init(), readFields(), and TranslateToSG().
|
private |
Definition at line 57 of file x3d_transform.h.
Referenced by init(), readFields(), and TranslateToSG().
|
private |
Definition at line 60 of file x3d_transform.h.
Referenced by init(), readFields(), and TranslateToSG().
|
private |
Definition at line 58 of file x3d_transform.h.
Referenced by init(), readFields(), and TranslateToSG().