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

#include <x3d_transform.h>

Inheritance diagram for X3DTRANSFORM:
X3DNODE

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
 
SGNODETranslateToSG (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.
 
X3DNODEGetParent (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

X3DNODEm_Parent
 
X3DNODES m_Type
 
X3D_DICTm_Dict
 
std::list< X3DNODE * > m_BackPointers
 
std::list< X3DNODE * > m_Children
 
std::list< X3DNODE * > m_Refs
 
std::string m_error
 
wxString m_Name
 
SGNODEm_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
 

Detailed Description

Definition at line 39 of file x3d_transform.h.

Constructor & Destructor Documentation

◆ X3DTRANSFORM() [1/2]

X3DTRANSFORM::X3DTRANSFORM ( )

Definition at line 35 of file x3d_transform.cpp.

References init(), X3DNODE::m_Type, and X3D_TRANSFORM.

◆ X3DTRANSFORM() [2/2]

X3DTRANSFORM::X3DTRANSFORM ( X3DNODE aParent)

◆ ~X3DTRANSFORM()

X3DTRANSFORM::~X3DTRANSFORM ( )
virtual

Member Function Documentation

◆ AddChildNode()

bool X3DTRANSFORM::AddChildNode ( X3DNODE aNode)
overridevirtual

◆ addNodeRef()

void X3DNODE::addNodeRef ( X3DNODE aNode)
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.

Parameters
aNodeis 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().

◆ AddRefNode()

bool X3DTRANSFORM::AddRefNode ( X3DNODE aNode)
overridevirtual

◆ delNodeRef()

void X3DNODE::delNodeRef ( X3DNODE aNode)
inherited

Remove a pointer to a node which references, but does not own, this node.

Parameters
aNodeis the node holding a reference to this object.

Definition at line 165 of file x3d_base.cpp.

References X3DNODE::m_BackPointers, and traceVrmlPlugin.

◆ GetError()

std::string X3DNODE::GetError ( void  )
inherited

Definition at line 202 of file x3d_base.cpp.

References X3DNODE::m_error.

◆ GetName()

wxString X3DNODE::GetName ( void  ) const
inherited

Return the name of this object.

Definition at line 196 of file x3d_base.cpp.

References X3DNODE::m_Name.

◆ GetNodeType()

◆ GetParent()

X3DNODE * X3DNODE::GetParent ( void  ) const
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().

◆ init()

void X3DTRANSFORM::init ( )
private

Definition at line 69 of file x3d_transform.cpp.

References bboxCenter, bboxSize, center, rotation, scale, scaleOrientation, and translation.

Referenced by X3DTRANSFORM().

◆ Read()

bool X3DTRANSFORM::Read ( wxXmlNode *  aNode,
X3DNODE aTopNode,
X3D_DICT aDict 
)
overridevirtual

◆ readFields()

void X3DTRANSFORM::readFields ( wxXmlNode *  aNode)
private

◆ SetParent()

bool X3DTRANSFORM::SetParent ( X3DNODE aParent,
bool  doUnlink = true 
)
overridevirtual

Set the parent X3DNODE of this object.

Parameters
aParent[in] is the desired parent node.
doUnlinkindicates that the child must be unlinked from the parent
Returns
true if the operation succeeds or false if the given node is not allowed to be a parent to the derived object.

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().

◆ TranslateToSG()

SGNODE * X3DTRANSFORM::TranslateToSG ( SGNODE aParent)
overridevirtual

◆ unlinkChildNode()

void X3DNODE::unlinkChildNode ( const X3DNODE aNode)
virtualinherited

Remove references to an owned child; it is invoked by the child upon destruction to ensure that the parent has no invalid references.

Parameters
aNodeis 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().

◆ unlinkRefNode()

void X3DNODE::unlinkRefNode ( const X3DNODE aNode)
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.

Parameters
aNodeis 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().

Member Data Documentation

◆ bboxCenter

WRLVEC3F X3DTRANSFORM::bboxCenter
private

Definition at line 61 of file x3d_transform.h.

Referenced by init().

◆ bboxSize

WRLVEC3F X3DTRANSFORM::bboxSize
private

Definition at line 62 of file x3d_transform.h.

Referenced by init().

◆ center

WRLVEC3F X3DTRANSFORM::center
private

Definition at line 56 of file x3d_transform.h.

Referenced by init(), readFields(), and TranslateToSG().

◆ m_BackPointers

◆ m_Children

◆ m_Dict

◆ m_error

std::string X3DNODE::m_error
protectedinherited

Definition at line 166 of file x3d_base.h.

Referenced by X3DNODE::GetError().

◆ m_Name

wxString X3DNODE::m_Name
protectedinherited

◆ m_Parent

◆ m_Refs

◆ m_sgNode

SGNODE* X3DNODE::m_sgNode
protectedinherited

◆ m_Type

◆ rotation

WRLROTATION X3DTRANSFORM::rotation
private

Definition at line 59 of file x3d_transform.h.

Referenced by init(), readFields(), and TranslateToSG().

◆ scale

WRLVEC3F X3DTRANSFORM::scale
private

Definition at line 57 of file x3d_transform.h.

Referenced by init(), readFields(), and TranslateToSG().

◆ scaleOrientation

WRLROTATION X3DTRANSFORM::scaleOrientation
private

Definition at line 60 of file x3d_transform.h.

Referenced by init(), readFields(), and TranslateToSG().

◆ translation

WRLVEC3F X3DTRANSFORM::translation
private

Definition at line 58 of file x3d_transform.h.

Referenced by init(), readFields(), and TranslateToSG().


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