KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IFSG_SHAPE Class Reference

IFSG_SHAPE is the wrapper for the SGSHAPE class. More...

#include <ifsg_shape.h>

Inheritance diagram for IFSG_SHAPE:
IFSG_NODE

Public Member Functions

 IFSG_SHAPE (bool create)
 
 IFSG_SHAPE (SGNODE *aParent)
 
 IFSG_SHAPE (IFSG_NODE &aParent)
 
bool Attach (SGNODE *aNode) override
 Function Attach associates a given SGNODE* with this wrapper. More...
 
bool NewNode (SGNODE *aParent) override
 Function NewNode creates a new node to associate with this wrapper. More...
 
bool NewNode (IFSG_NODE &aParent) override
 
void Destroy (void)
 Function Destroy deletes the object held by this wrapper. More...
 
SGNODEGetRawPtr (void) noexcept
 Function GetRawPtr() returns the raw internal SGNODE pointer. More...
 
S3D::SGTYPES GetNodeType (void) const
 Function GetNodeType returns the type of this node instance. More...
 
SGNODEGetParent (void) const
 Function GetParent returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie. More...
 
bool SetParent (SGNODE *aParent)
 Function SetParent sets the parent SGNODE of this object. More...
 
const char * GetName (void)
 Function GetName returns a pointer to the node name (NULL if no name assigned) More...
 
bool SetName (const char *aName)
 Function SetName sets the node's name; if the pointer passed is NULL then the node's name is erased. More...
 
const char * GetNodeTypeName (S3D::SGTYPES aNodeType) const
 Function GetNodeTypeName returns the text representation of the node type or NULL if the node somehow has an invalid type. More...
 
SGNODEFindNode (const char *aNodeName)
 Function FindNode searches the tree of linked nodes and returns a reference to the first node found with the given name. More...
 
bool AddRefNode (SGNODE *aNode)
 Function AddRefNode adds a reference to an existing node which is not owned by (not a child of) this node. More...
 
bool AddRefNode (IFSG_NODE &aNode)
 
bool AddChildNode (SGNODE *aNode)
 Function AddChildNode adds a node as a child owned by this node. More...
 
bool AddChildNode (IFSG_NODE &aNode)
 

Protected Attributes

SGNODEm_node
 

Detailed Description

IFSG_SHAPE is the wrapper for the SGSHAPE class.

Definition at line 40 of file ifsg_shape.h.

Constructor & Destructor Documentation

◆ IFSG_SHAPE() [1/3]

IFSG_SHAPE::IFSG_SHAPE ( bool  create)

Definition at line 38 of file ifsg_shape.cpp.

References SGNODE::AssociateWrapper(), and IFSG_NODE::m_node.

◆ IFSG_SHAPE() [2/3]

IFSG_SHAPE::IFSG_SHAPE ( SGNODE aParent)

◆ IFSG_SHAPE() [3/3]

IFSG_SHAPE::IFSG_SHAPE ( IFSG_NODE aParent)

Member Function Documentation

◆ AddChildNode() [1/2]

bool IFSG_NODE::AddChildNode ( IFSG_NODE aNode)
inherited

Definition at line 156 of file ifsg_node.cpp.

References SGNODE::AddChildNode(), IFSG_NODE::GetRawPtr(), and IFSG_NODE::m_node.

◆ AddChildNode() [2/2]

bool IFSG_NODE::AddChildNode ( SGNODE aNode)
inherited

Function AddChildNode adds a node as a child owned by this node.

Returns
true on success

Definition at line 148 of file ifsg_node.cpp.

References SGNODE::AddChildNode(), and IFSG_NODE::m_node.

Referenced by SHAPE::CalcShape(), EXPORTER_PCB_VRML::create_vrml_plane(), EXPORTER_PCB_VRML::create_vrml_shell(), EXPORTER_PCB_VRML::ExportVrmlFootprint(), and makeComponents().

◆ AddRefNode() [1/2]

bool IFSG_NODE::AddRefNode ( IFSG_NODE aNode)
inherited

Definition at line 136 of file ifsg_node.cpp.

References SGNODE::AddRefNode(), IFSG_NODE::GetRawPtr(), and IFSG_NODE::m_node.

◆ AddRefNode() [2/2]

bool IFSG_NODE::AddRefNode ( SGNODE aNode)
inherited

Function AddRefNode adds a reference to an existing node which is not owned by (not a child of) this node.

Returns
true on success

Definition at line 128 of file ifsg_node.cpp.

References SGNODE::AddRefNode(), and IFSG_NODE::m_node.

Referenced by SHAPE::CalcShape(), EXPORTER_PCB_VRML::create_vrml_plane(), EXPORTER_PCB_VRML::create_vrml_shell(), EXPORTER_PCB_VRML::ExportVrmlFootprint(), makeComponents(), and vrmlToSG().

◆ Attach()

bool IFSG_SHAPE::Attach ( SGNODE aNode)
overridevirtual

Function Attach associates a given SGNODE* with this wrapper.

Implements IFSG_NODE.

Definition at line 99 of file ifsg_shape.cpp.

References SGNODE::AssociateWrapper(), SGNODE::DisassociateWrapper(), SGNODE::GetNodeType(), IFSG_NODE::m_node, and S3D::SGTYPE_SHAPE.

◆ Destroy()

◆ FindNode()

SGNODE * IFSG_NODE::FindNode ( const char *  aNodeName)
inherited

Function FindNode searches 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().

Parameters
aNodeNameis the name of the node to search for
Returns
is a valid node pointer on success, otherwise NULL

Definition at line 120 of file ifsg_node.cpp.

References SGNODE::FindNode(), and IFSG_NODE::m_node.

◆ GetName()

const char * IFSG_NODE::GetName ( void  )
inherited

Function GetName returns a pointer to the node name (NULL if no name assigned)

Definition at line 95 of file ifsg_node.cpp.

References SGNODE::GetName(), and IFSG_NODE::m_node.

◆ GetNodeType()

S3D::SGTYPES IFSG_NODE::GetNodeType ( void  ) const
inherited

Function GetNodeType returns the type of this node instance.

Definition at line 71 of file ifsg_node.cpp.

References SGNODE::GetNodeType(), IFSG_NODE::m_node, and S3D::SGTYPE_END.

◆ GetNodeTypeName()

const char * IFSG_NODE::GetNodeTypeName ( S3D::SGTYPES  aNodeType) const
inherited

Function GetNodeTypeName returns the text representation of the node type or NULL if the node somehow has an invalid type.

Definition at line 112 of file ifsg_node.cpp.

References SGNODE::GetNodeTypeName(), and IFSG_NODE::m_node.

◆ GetParent()

SGNODE * IFSG_NODE::GetParent ( void  ) const
inherited

Function GetParent returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie.

top level transform).

Definition at line 79 of file ifsg_node.cpp.

References SGNODE::GetParent(), and IFSG_NODE::m_node.

Referenced by makeComponents().

◆ GetRawPtr()

◆ NewNode() [1/2]

bool IFSG_SHAPE::NewNode ( IFSG_NODE aParent)
overridevirtual

Implements IFSG_NODE.

Definition at line 145 of file ifsg_shape.cpp.

References IFSG_NODE::GetRawPtr(), and NewNode().

◆ NewNode() [2/2]

bool IFSG_SHAPE::NewNode ( SGNODE aParent)
overridevirtual

Function NewNode creates a new node to associate with this wrapper.

Implements IFSG_NODE.

Definition at line 121 of file ifsg_shape.cpp.

References SGNODE::AssociateWrapper(), SGNODE::DisassociateWrapper(), SGNODE::GetNodeType(), SGNODE::GetNodeTypeName(), SGNODE::GetParent(), and IFSG_NODE::m_node.

Referenced by SHAPE::CalcShape(), EXPORTER_PCB_VRML::create_vrml_shell(), NewNode(), and vrmlToSG().

◆ SetName()

bool IFSG_NODE::SetName ( const char *  aName)
inherited

Function SetName sets the node's name; if the pointer passed is NULL then the node's name is erased.

Returns
true on success

Definition at line 103 of file ifsg_node.cpp.

References IFSG_NODE::m_node, and SGNODE::SetName().

◆ SetParent()

bool IFSG_NODE::SetParent ( SGNODE aParent)
inherited

Function SetParent sets the parent SGNODE of this object.

Parameters
aParent[in] is the desired parent node
Returns
true if the operation succeeds; false if the given node is not allowed to be a parent to the derived object

Definition at line 87 of file ifsg_node.cpp.

References IFSG_NODE::m_node, and SGNODE::SetParent().

Referenced by processFace(), and EXPORTER_PCB_VRML::~EXPORTER_PCB_VRML().

Member Data Documentation

◆ m_node

SGNODE* IFSG_NODE::m_node
protectedinherited

Definition at line 57 of file ifsg_node.h.

Referenced by IFSG_NODE::AddChildNode(), IFSG_COLORS::AddColor(), IFSG_COORDS::AddCoord(), IFSG_INDEX::AddIndex(), IFSG_NORMALS::AddNormal(), IFSG_NODE::AddRefNode(), IFSG_APPEARANCE::Attach(), IFSG_COLORS::Attach(), IFSG_COORDINDEX::Attach(), IFSG_COORDS::Attach(), IFSG_FACESET::Attach(), IFSG_NORMALS::Attach(), Attach(), IFSG_TRANSFORM::Attach(), IFSG_FACESET::CalcNormals(), IFSG_NODE::Destroy(), IFSG_NODE::FindNode(), IFSG_COLORS::GetColorList(), IFSG_COORDS::GetCoordsList(), IFSG_INDEX::GetIndices(), IFSG_NODE::GetName(), IFSG_NODE::GetNodeType(), IFSG_NODE::GetNodeTypeName(), IFSG_NORMALS::GetNormalList(), IFSG_NODE::GetParent(), IFSG_APPEARANCE::IFSG_APPEARANCE(), IFSG_COLORS::IFSG_COLORS(), IFSG_COORDINDEX::IFSG_COORDINDEX(), IFSG_COORDS::IFSG_COORDS(), IFSG_FACESET::IFSG_FACESET(), IFSG_NODE::IFSG_NODE(), IFSG_NORMALS::IFSG_NORMALS(), IFSG_SHAPE(), IFSG_TRANSFORM::IFSG_TRANSFORM(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), NewNode(), IFSG_TRANSFORM::NewNode(), IFSG_APPEARANCE::SetAmbient(), IFSG_COLORS::SetColorList(), IFSG_COORDS::SetCoordsList(), IFSG_APPEARANCE::SetDiffuse(), IFSG_APPEARANCE::SetEmissive(), IFSG_INDEX::SetIndices(), IFSG_NODE::SetName(), IFSG_NORMALS::SetNormalList(), IFSG_NODE::SetParent(), IFSG_TRANSFORM::SetRotation(), IFSG_TRANSFORM::SetScale(), IFSG_TRANSFORM::SetScaleOrientation(), IFSG_APPEARANCE::SetSpecular(), and IFSG_NODE::~IFSG_NODE().


The documentation for this class was generated from the following files: