KiCad PCB EDA Suite
|
#include <vrml2_faceset.h>
Public Member Functions | |
WRL2FACESET () | |
WRL2FACESET (WRL2NODE *aParent) | |
virtual | ~WRL2FACESET () |
bool | Read (WRLPROC &proc, WRL2BASE *aTopNode) override |
bool | AddRefNode (WRL2NODE *aNode) override |
bool | AddChildNode (WRL2NODE *aNode) override |
SGNODE * | TranslateToSG (SGNODE *aParent) override |
Produce a representation of the data using the intermediate scenegraph structures of the kicad_3dsg library. | |
bool | HasColors (void) |
bool | isDangling (void) override |
Determine whether an object should be moved to a different parent during the VRML to SG* translation. | |
void | unlinkChildNode (const WRL2NODE *aNode) override |
Remove references to an owned child. | |
void | unlinkRefNode (const WRL2NODE *aNode) override |
Remove pointers to a referenced node. | |
WRL2NODES | GetNodeType (void) const |
WRL2NODE * | GetParent (void) const |
virtual bool | SetParent (WRL2NODE *aParent, bool doUnlink=true) |
Set the parent WRL2NODE of this object. | |
virtual std::string | GetName (void) |
virtual bool | SetName (const std::string &aName) |
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. | |
std::string | GetError (void) |
WRL2NODES | getNodeTypeID (const std::string &aNodeName) |
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 | checkNodeType (WRL2NODES aType) |
void | setDefaults (void) |
Private Attributes | |
WRL2NODE * | color |
WRL2NODE * | coord |
WRL2NODE * | normal |
WRL2NODE * | texCoord |
bool | ccw |
bool | colorPerVertex |
bool | convex |
bool | normalPerVertex |
bool | solid |
std::vector< int > | colorIndex |
std::vector< int > | coordIndex |
std::vector< int > | normalIndex |
float | creaseAngle |
float | creaseLimit |
Definition at line 40 of file vrml2_faceset.h.
WRL2FACESET::WRL2FACESET | ( | ) |
Definition at line 38 of file vrml2_faceset.cpp.
References WRL2NODE::m_Type, and setDefaults().
WRL2FACESET::WRL2FACESET | ( | WRL2NODE * | aParent | ) |
Definition at line 45 of file vrml2_faceset.cpp.
References WRL2NODE::AddChildNode(), WRL2NODE::m_Parent, WRL2NODE::m_Type, and setDefaults().
|
virtual |
Definition at line 56 of file vrml2_faceset.cpp.
References WRL2NODE::m_BackPointers, WRL2NODE::m_Children, WRL2NODE::m_Refs, and traceVrmlPlugin.
|
overridevirtual |
Reimplemented from WRL2NODE.
Definition at line 201 of file vrml2_faceset.cpp.
References WRL2NODE::AddChildNode(), checkNodeType(), color, coord, WRL2NODE::GetNodeType(), WRL2NODE::GetNodeTypeName(), normal, texCoord, and traceVrmlPlugin.
|
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().
|
overridevirtual |
Reimplemented from WRL2NODE.
Definition at line 119 of file vrml2_faceset.cpp.
References WRL2NODE::AddRefNode(), checkNodeType(), color, coord, WRL2NODE::GetNodeType(), WRL2NODE::GetNodeTypeName(), normal, texCoord, and traceVrmlPlugin.
|
private |
Definition at line 83 of file vrml2_faceset.cpp.
Referenced by AddChildNode(), and AddRefNode().
|
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 WRL2BASE::implementUse().
|
inherited |
Definition at line 299 of file vrml2_node.cpp.
References WRL2NODE::m_error.
|
virtualinherited |
Reimplemented in WRL2BASE.
Definition at line 216 of file vrml2_node.cpp.
References WRL2NODE::m_Name.
|
inherited |
Definition at line 204 of file vrml2_node.cpp.
References WRL2NODE::m_Type.
Referenced by WRL2NODE::AddChildNode(), WRL2APPEARANCE::AddChildNode(), AddChildNode(), WRL2LINESET::AddChildNode(), WRL2POINTSET::AddChildNode(), WRL2SHAPE::AddChildNode(), WRL2NODE::AddRefNode(), WRL2APPEARANCE::AddRefNode(), AddRefNode(), WRL2LINESET::AddRefNode(), WRL2POINTSET::AddRefNode(), WRL2SHAPE::AddRefNode(), WRL2SWITCH::AddRefNode(), WRL2TRANSFORM::AddRefNode(), WRL2BASE::implementUse(), WRL2APPEARANCE::isDangling(), WRL2BOX::isDangling(), WRL2COLOR::isDangling(), WRL2COORDS::isDangling(), 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 WRL2BASE::ReadNode().
|
inherited |
Definition at line 273 of file vrml2_node.cpp.
References nodenames.
Referenced by WRL2APPEARANCE::AddChildNode(), AddChildNode(), WRL2LINESET::AddChildNode(), WRL2POINTSET::AddChildNode(), WRL2SHAPE::AddChildNode(), WRL2APPEARANCE::AddRefNode(), 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(), unlinkChildNode(), WRL2LINESET::unlinkChildNode(), WRL2POINTSET::unlinkChildNode(), WRL2APPEARANCE::unlinkRefNode(), unlinkRefNode(), WRL2LINESET::unlinkRefNode(), and WRL2POINTSET::unlinkRefNode().
bool WRL2FACESET::HasColors | ( | void | ) |
Definition at line 766 of file vrml2_faceset.cpp.
References color.
|
overridevirtual |
Determine whether an object should be moved to a different parent during the VRML to SG* translation.
Implements WRL2NODE.
Definition at line 108 of file vrml2_faceset.cpp.
References WRL2NODE::GetNodeType(), and WRL2NODE::m_Parent.
Implements WRL2NODE.
Definition at line 284 of file vrml2_faceset.cpp.
References ccw, colorIndex, colorPerVertex, convex, coordIndex, creaseAngle, creaseLimit, WRLPROC::eof(), WRLPROC::GetError(), WRLPROC::GetFileName(), WRLPROC::GetFilePosition(), M_PI_2, normalIndex, normalPerVertex, WRLPROC::Peek(), WRLPROC::Pop(), WRLPROC::ReadMFInt(), WRLPROC::ReadName(), WRL2BASE::ReadNode(), WRLPROC::ReadSFBool(), WRLPROC::ReadSFFloat(), solid, and traceVrmlPlugin.
Referenced by WRL2BASE::readFaceSet().
|
private |
Definition at line 65 of file vrml2_faceset.cpp.
References ccw, color, colorPerVertex, convex, coord, creaseAngle, creaseLimit, normal, normalPerVertex, solid, and texCoord.
Referenced by WRL2FACESET().
|
virtualinherited |
Reimplemented in WRL2BASE.
Definition at line 222 of file vrml2_node.cpp.
References BAD_CHARS1, BAD_CHARS2, badNames, WRL2NODE::m_Name, and traceVrmlPlugin.
Referenced by WRL2BASE::implementDef().
|
virtualinherited |
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 in WRL2BASE.
Definition at line 339 of file vrml2_node.cpp.
References WRL2NODE::AddChildNode(), WRL2NODE::m_Parent, and WRL2NODE::unlinkChildNode().
Referenced by WRL2NODE::AddChildNode(), WRL2SWITCH::AddRefNode(), and WRL2TRANSFORM::AddRefNode().
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 544 of file vrml2_faceset.cpp.
References FACET::AddColor(), S3D::AddSGNodeChild(), S3D::AddSGNodeRef(), FACET::AddVertex(), SHAPE::CalcShape(), ccw, color, colorIndex, colorPerVertex, coord, coordIndex, creaseLimit, WRL2COLOR::GetColor(), S3D::GetSGNodeParent(), S3D::GetSGNodeType(), FACET::HasMinPoints(), FACET::Init(), WRL2NODE::m_BackPointers, WRL2NODE::m_Children, WRL2NODE::m_Refs, WRL2NODE::m_sgNode, SHAPE::NewFacet(), SGCOLOR::SetColor(), S3D::SGTYPE_SHAPE, and traceVrmlPlugin.
|
overridevirtual |
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 from WRL2NODE.
Definition at line 724 of file vrml2_faceset.cpp.
References color, coord, WRL2NODE::GetParent(), normal, texCoord, and WRL2NODE::unlinkChildNode().
|
overridevirtual |
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 from WRL2NODE.
Definition at line 745 of file vrml2_faceset.cpp.
References color, coord, WRL2NODE::GetParent(), normal, texCoord, and WRL2NODE::unlinkRefNode().
|
private |
Definition at line 75 of file vrml2_faceset.h.
Referenced by Read(), setDefaults(), and TranslateToSG().
|
private |
Definition at line 70 of file vrml2_faceset.h.
Referenced by AddChildNode(), AddRefNode(), HasColors(), setDefaults(), TranslateToSG(), unlinkChildNode(), and unlinkRefNode().
|
private |
Definition at line 81 of file vrml2_faceset.h.
Referenced by Read(), and TranslateToSG().
|
private |
Definition at line 76 of file vrml2_faceset.h.
Referenced by Read(), setDefaults(), and TranslateToSG().
|
private |
Definition at line 77 of file vrml2_faceset.h.
Referenced by Read(), and setDefaults().
|
private |
Definition at line 71 of file vrml2_faceset.h.
Referenced by AddChildNode(), AddRefNode(), setDefaults(), TranslateToSG(), unlinkChildNode(), and unlinkRefNode().
|
private |
Definition at line 82 of file vrml2_faceset.h.
Referenced by Read(), and TranslateToSG().
|
private |
Definition at line 85 of file vrml2_faceset.h.
Referenced by Read(), and setDefaults().
|
private |
Definition at line 86 of file vrml2_faceset.h.
Referenced by Read(), setDefaults(), and TranslateToSG().
|
protectedinherited |
Definition at line 173 of file vrml2_node.h.
Referenced by WRL2NODE::addNodeRef(), WRL2NODE::delNodeRef(), WRL2APPEARANCE::TranslateToSG(), TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2APPEARANCE::~WRL2APPEARANCE(), ~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(), WRL2BASE::TranslateToSG(), TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2NODE::unlinkChildNode(), WRL2APPEARANCE::~WRL2APPEARANCE(), ~WRL2FACESET(), WRL2LINESET::~WRL2LINESET(), WRL2NODE::~WRL2NODE(), WRL2POINTSET::~WRL2POINTSET(), WRL2SHAPE::~WRL2SHAPE(), WRL2SWITCH::~WRL2SWITCH(), and WRL2TRANSFORM::~WRL2TRANSFORM().
|
protectedinherited |
Definition at line 176 of file vrml2_node.h.
Referenced by WRL2NODE::GetError().
|
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(), isDangling(), WRL2LINESET::isDangling(), WRL2MATERIAL::isDangling(), WRL2NORMS::isDangling(), WRL2POINTSET::isDangling(), WRL2SHAPE::isDangling(), WRL2NODE::SetParent(), WRL2APPEARANCE::WRL2APPEARANCE(), WRL2BOX::WRL2BOX(), WRL2COLOR::WRL2COLOR(), WRL2COORDS::WRL2COORDS(), 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(), TranslateToSG(), WRL2MATERIAL::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2SWITCH::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), WRL2NODE::unlinkRefNode(), WRL2APPEARANCE::~WRL2APPEARANCE(), ~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(), WRL2BASE::TranslateToSG(), WRL2BOX::TranslateToSG(), 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::WRL2BASE(), WRL2BOX::WRL2BOX(), WRL2COLOR::WRL2COLOR(), WRL2COORDS::WRL2COORDS(), WRL2FACESET(), WRL2INLINE::WRL2INLINE(), WRL2LINESET::WRL2LINESET(), WRL2MATERIAL::WRL2MATERIAL(), WRL2NODE::WRL2NODE(), WRL2NORMS::WRL2NORMS(), WRL2POINTSET::WRL2POINTSET(), WRL2SHAPE::WRL2SHAPE(), WRL2SWITCH::WRL2SWITCH(), and WRL2TRANSFORM::WRL2TRANSFORM().
|
private |
Definition at line 72 of file vrml2_faceset.h.
Referenced by AddChildNode(), AddRefNode(), setDefaults(), unlinkChildNode(), and unlinkRefNode().
|
private |
Definition at line 83 of file vrml2_faceset.h.
Referenced by Read().
|
private |
Definition at line 78 of file vrml2_faceset.h.
Referenced by Read(), and setDefaults().
|
private |
Definition at line 79 of file vrml2_faceset.h.
Referenced by Read(), and setDefaults().
|
private |
Definition at line 73 of file vrml2_faceset.h.
Referenced by AddChildNode(), AddRefNode(), setDefaults(), unlinkChildNode(), and unlinkRefNode().