KiCad PCB EDA Suite
IFSG_APPEARANCE Class Reference

#include <ifsg_appearance.h>

Inheritance diagram for IFSG_APPEARANCE:
IFSG_NODE

Public Member Functions

 IFSG_APPEARANCE (bool create)
 
 IFSG_APPEARANCE (SGNODE *aParent)
 
 IFSG_APPEARANCE (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
 
bool SetEmissive (float aRVal, float aGVal, float aBVal)
 
bool SetEmissive (const SGCOLOR *aRGBColor)
 
bool SetEmissive (const SGCOLOR &aRGBColor)
 
bool SetDiffuse (float aRVal, float aGVal, float aBVal)
 
bool SetDiffuse (const SGCOLOR *aRGBColor)
 
bool SetDiffuse (const SGCOLOR &aRGBColor)
 
bool SetSpecular (float aRVal, float aGVal, float aBVal)
 
bool SetSpecular (const SGCOLOR *aRGBColor)
 
bool SetSpecular (const SGCOLOR &aRGBColor)
 
bool SetAmbient (float aRVal, float aGVal, float aBVal)
 
bool SetAmbient (const SGCOLOR *aRGBColor)
 
bool SetAmbient (const SGCOLOR &aRGBColor)
 
bool SetShininess (float aShininess) noexcept
 
bool SetTransparency (float aTransparency) noexcept
 
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

Definition at line 34 of file ifsg_appearance.h.

Constructor & Destructor Documentation

◆ IFSG_APPEARANCE() [1/3]

IFSG_APPEARANCE::IFSG_APPEARANCE ( bool  create)

Definition at line 37 of file ifsg_appearance.cpp.

38 {
39  m_node = nullptr;
40 
41  if( !create )
42  return ;
43 
44  m_node = new SGAPPEARANCE( nullptr );
45 
47 }
void AssociateWrapper(SGNODE **aWrapperRef) noexcept
Associate this object with a handle to itself.
Definition: sg_node.cpp:205
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

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

◆ IFSG_APPEARANCE() [2/3]

IFSG_APPEARANCE::IFSG_APPEARANCE ( SGNODE aParent)

Definition at line 50 of file ifsg_appearance.cpp.

51 {
52  m_node = new SGAPPEARANCE( nullptr );
53 
54  if( !m_node->SetParent( aParent ) )
55  {
56  delete m_node;
57  m_node = nullptr;
58 
59  wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
60 
61  return;
62  }
63 
65 }
char WrongParent[]
Definition: ifsg_node.cpp:39
void AssociateWrapper(SGNODE **aWrapperRef) noexcept
Associate this object with a handle to itself.
Definition: sg_node.cpp:205
SGNODE * m_node
Definition: ifsg_node.h:57
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Set the parent SGNODE of this object.
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

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

◆ IFSG_APPEARANCE() [3/3]

IFSG_APPEARANCE::IFSG_APPEARANCE ( IFSG_NODE aParent)

Definition at line 68 of file ifsg_appearance.cpp.

69 {
70  SGNODE* pp = aParent.GetRawPtr();
71 
72 #ifdef DEBUG
73  if( ! pp )
74  {
75  wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
76  }
77 #endif
78 
79  m_node = new SGAPPEARANCE( nullptr );
80 
81  if( !m_node->SetParent( pp ) )
82  {
83  delete m_node;
84  m_node = nullptr;
85 
86  wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
87 
88  return;
89  }
90 
92 }
char WrongParent[]
Definition: ifsg_node.cpp:39
void AssociateWrapper(SGNODE **aWrapperRef) noexcept
Associate this object with a handle to itself.
Definition: sg_node.cpp:205
SGNODE * m_node
Definition: ifsg_node.h:57
The base class of all Scene Graph nodes.
Definition: sg_node.h:74
SGNODE * GetRawPtr(void) noexcept
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:65
char BadParent[]
Definition: ifsg_node.cpp:38
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Set the parent SGNODE of this object.
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References SGNODE::AssociateWrapper(), BadParent, IFSG_NODE::GetRawPtr(), IFSG_NODE::m_node, SGNODE::SetParent(), and WrongParent.

Member Function Documentation

◆ AddChildNode() [1/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.

149 {
150  wxCHECK( m_node, false );
151 
152  return m_node->AddChildNode( aNode );
153 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual bool AddChildNode(SGNODE *aNode)=0

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

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

◆ AddChildNode() [2/2]

bool IFSG_NODE::AddChildNode ( IFSG_NODE aNode)
inherited

Definition at line 156 of file ifsg_node.cpp.

157 {
158  wxCHECK( m_node, false );
159 
160  SGNODE* np = aNode.GetRawPtr();
161 
162  wxCHECK( np, false );
163 
164  return m_node->AddChildNode( np );
165 }
SGNODE * m_node
Definition: ifsg_node.h:57
The base class of all Scene Graph nodes.
Definition: sg_node.h:74
SGNODE * GetRawPtr(void) noexcept
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:65
virtual bool AddChildNode(SGNODE *aNode)=0

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

◆ AddRefNode() [1/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.

129 {
130  wxCHECK( m_node, false );
131 
132  return m_node->AddRefNode( aNode );
133 }
virtual bool AddRefNode(SGNODE *aNode)=0
SGNODE * m_node
Definition: ifsg_node.h:57

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

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

◆ AddRefNode() [2/2]

bool IFSG_NODE::AddRefNode ( IFSG_NODE aNode)
inherited

Definition at line 136 of file ifsg_node.cpp.

137 {
138  wxCHECK( m_node, false );
139 
140  SGNODE* np = aNode.GetRawPtr();
141 
142  wxCHECK( np, false );
143 
144  return m_node->AddRefNode( np );
145 }
virtual bool AddRefNode(SGNODE *aNode)=0
SGNODE * m_node
Definition: ifsg_node.h:57
The base class of all Scene Graph nodes.
Definition: sg_node.h:74
SGNODE * GetRawPtr(void) noexcept
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:65

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

◆ Attach()

bool IFSG_APPEARANCE::Attach ( SGNODE aNode)
overridevirtual

Function Attach associates a given SGNODE* with this wrapper.

Implements IFSG_NODE.

Definition at line 95 of file ifsg_appearance.cpp.

96 {
97  if( m_node )
99 
100  m_node = nullptr;
101 
102  if( !aNode )
103  return false;
104 
105  if( S3D::SGTYPE_APPEARANCE != aNode->GetNodeType() )
106  {
107  return false;
108  }
109 
110  m_node = aNode;
112 
113  return true;
114 }
void AssociateWrapper(SGNODE **aWrapperRef) noexcept
Associate this object with a handle to itself.
Definition: sg_node.cpp:205
SGNODE * m_node
Definition: ifsg_node.h:57
void DisassociateWrapper(SGNODE **aWrapperRef) noexcept
Remove the association between an IFSG* wrapper object and this object.
Definition: sg_node.cpp:223
S3D::SGTYPES GetNodeType(void) const noexcept
Return the type of this node instance.
Definition: sg_node.cpp:104

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

Referenced by X3DSHAPE::TranslateToSG().

◆ Destroy()

void IFSG_NODE::Destroy ( void  )
inherited

Function Destroy deletes the object held by this wrapper.

Definition at line 55 of file ifsg_node.cpp.

56 {
57  if( m_node )
59 
60  delete m_node;
61  m_node = nullptr;
62 }
SGNODE * m_node
Definition: ifsg_node.h:57
void DisassociateWrapper(SGNODE **aWrapperRef) noexcept
Remove the association between an IFSG* wrapper object and this object.
Definition: sg_node.cpp:223

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

Referenced by loadIDFBoard(), processSolid(), WRL1GROUP::TranslateToSG(), WRL1SEPARATOR::TranslateToSG(), WRL2SHAPE::TranslateToSG(), WRL2TRANSFORM::TranslateToSG(), X3DSHAPE::TranslateToSG(), X3DTRANSFORM::TranslateToSG(), WRL1BASE::TranslateToSG(), WRL2BASE::TranslateToSG(), and EXPORTER_PCB_VRML::~EXPORTER_PCB_VRML().

◆ 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.

121 {
122  wxCHECK( m_node, nullptr );
123 
124  return m_node->FindNode( aNodeName, nullptr );
125 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual SGNODE * FindNode(const char *aNodeName, const SGNODE *aCaller)=0
Search the tree of linked nodes and return a reference to the first node found with the given name.

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.

96 {
97  wxCHECK( m_node, nullptr );
98 
99  return m_node->GetName();
100 }
SGNODE * m_node
Definition: ifsg_node.h:57
const char * GetName(void)
Definition: sg_node.cpp:146

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.

72 {
73  wxCHECK( m_node, S3D::SGTYPE_END );
74 
75  return m_node->GetNodeType();
76 }
SGNODE * m_node
Definition: ifsg_node.h:57
S3D::SGTYPES GetNodeType(void) const noexcept
Return the type of this node instance.
Definition: sg_node.cpp:104

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.

113 {
114  wxCHECK( m_node, nullptr );
115 
116  return m_node->GetNodeTypeName( aNodeType );
117 }
SGNODE * m_node
Definition: ifsg_node.h:57
const char * GetNodeTypeName(S3D::SGTYPES aNodeType) const noexcept
Definition: sg_node.cpp:164

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.

80 {
81  wxCHECK( m_node, nullptr );
82 
83  return m_node->GetParent();
84 }
SGNODE * m_node
Definition: ifsg_node.h:57
SGNODE * GetParent(void) const noexcept
Returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie.
Definition: sg_node.cpp:110

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

Referenced by makeComponents().

◆ GetRawPtr()

◆ NewNode() [1/2]

bool IFSG_APPEARANCE::NewNode ( SGNODE aParent)
overridevirtual

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

Implements IFSG_NODE.

Definition at line 117 of file ifsg_appearance.cpp.

118 {
119  if( m_node )
121 
122  m_node = new SGAPPEARANCE( aParent );
123 
124  if( aParent != m_node->GetParent() )
125  {
126  wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE",
127  __FILE__, __FUNCTION__, __LINE__,
128  aParent->GetNodeTypeName( aParent->GetNodeType() ) );
129 
130  delete m_node;
131  m_node = nullptr;
132  return false;
133  }
134 
136 
137  return true;
138 }
void AssociateWrapper(SGNODE **aWrapperRef) noexcept
Associate this object with a handle to itself.
Definition: sg_node.cpp:205
SGNODE * m_node
Definition: ifsg_node.h:57
void DisassociateWrapper(SGNODE **aWrapperRef) noexcept
Remove the association between an IFSG* wrapper object and this object.
Definition: sg_node.cpp:223
const char * GetNodeTypeName(S3D::SGTYPES aNodeType) const noexcept
Definition: sg_node.cpp:164
SGNODE * GetParent(void) const noexcept
Returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie.
Definition: sg_node.cpp:110
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37
S3D::SGTYPES GetNodeType(void) const noexcept
Return the type of this node instance.
Definition: sg_node.cpp:104

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

Referenced by NewNode().

◆ NewNode() [2/2]

bool IFSG_APPEARANCE::NewNode ( IFSG_NODE aParent)
overridevirtual

Implements IFSG_NODE.

Definition at line 141 of file ifsg_appearance.cpp.

142 {
143  SGNODE* np = aParent.GetRawPtr();
144 
145  wxCHECK( np, false );
146 
147  return NewNode( np );
148 }
The base class of all Scene Graph nodes.
Definition: sg_node.h:74
SGNODE * GetRawPtr(void) noexcept
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:65
bool NewNode(SGNODE *aParent) override
Function NewNode creates a new node to associate with this wrapper.

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

◆ SetAmbient() [1/3]

bool IFSG_APPEARANCE::SetAmbient ( float  aRVal,
float  aGVal,
float  aBVal 
)

Definition at line 223 of file ifsg_appearance.cpp.

224 {
225  wxCHECK( m_node, false );
226 
227  return ( (SGAPPEARANCE*) m_node )->SetAmbient( aRVal, aGVal, aBVal );
228 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

Referenced by WRL1MATERIAL::GetAppearance(), DATA::GetColor(), EXPORTER_PCB_VRML::getSGColor(), WRL2MATERIAL::TranslateToSG(), and X3DAPP::TranslateToSG().

◆ SetAmbient() [2/3]

bool IFSG_APPEARANCE::SetAmbient ( const SGCOLOR aRGBColor)

Definition at line 231 of file ifsg_appearance.cpp.

232 {
233  wxCHECK( m_node, false );
234 
235  return ( (SGAPPEARANCE*) m_node )->SetAmbient( aRGBColor );
236 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetAmbient() [3/3]

bool IFSG_APPEARANCE::SetAmbient ( const SGCOLOR aRGBColor)

Definition at line 239 of file ifsg_appearance.cpp.

240 {
241  wxCHECK( m_node, false );
242 
243  return ( (SGAPPEARANCE*) m_node )->SetAmbient( aRGBColor );
244 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetDiffuse() [1/3]

bool IFSG_APPEARANCE::SetDiffuse ( float  aRVal,
float  aGVal,
float  aBVal 
)

Definition at line 175 of file ifsg_appearance.cpp.

176 {
177  wxCHECK( m_node, false );
178 
179  return ( (SGAPPEARANCE*) m_node )->SetDiffuse( aRVal, aGVal, aBVal );
180 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

Referenced by WRL1MATERIAL::GetAppearance(), getColor(), DATA::GetColor(), EXPORTER_PCB_VRML::getSGColor(), WRL2APPEARANCE::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), and X3DAPP::TranslateToSG().

◆ SetDiffuse() [2/3]

bool IFSG_APPEARANCE::SetDiffuse ( const SGCOLOR aRGBColor)

Definition at line 183 of file ifsg_appearance.cpp.

184 {
185  wxCHECK( m_node, false );
186 
187  return ( (SGAPPEARANCE*) m_node )->SetDiffuse( aRGBColor );
188 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetDiffuse() [3/3]

bool IFSG_APPEARANCE::SetDiffuse ( const SGCOLOR aRGBColor)

Definition at line 191 of file ifsg_appearance.cpp.

192 {
193  wxCHECK( m_node, false );
194 
195  return ( (SGAPPEARANCE*) m_node )->SetDiffuse( aRGBColor );
196 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetEmissive() [1/3]

bool IFSG_APPEARANCE::SetEmissive ( float  aRVal,
float  aGVal,
float  aBVal 
)

Definition at line 151 of file ifsg_appearance.cpp.

152 {
153  wxCHECK( m_node, false );
154 
155  return ( (SGAPPEARANCE*) m_node )->SetEmissive( aRVal, aGVal, aBVal );
156 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

Referenced by WRL1MATERIAL::GetAppearance(), WRL2APPEARANCE::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), and X3DAPP::TranslateToSG().

◆ SetEmissive() [2/3]

bool IFSG_APPEARANCE::SetEmissive ( const SGCOLOR aRGBColor)

Definition at line 159 of file ifsg_appearance.cpp.

160 {
161  wxCHECK( m_node, false );
162 
163  return ( (SGAPPEARANCE*) m_node )->SetEmissive( aRGBColor );
164 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetEmissive() [3/3]

bool IFSG_APPEARANCE::SetEmissive ( const SGCOLOR aRGBColor)

Definition at line 167 of file ifsg_appearance.cpp.

168 {
169  wxCHECK( m_node, false );
170 
171  return ( (SGAPPEARANCE*) m_node )->SetEmissive( aRGBColor );
172 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ 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.

104 {
105  wxCHECK( m_node, false );
106 
107  m_node->SetName( aName );
108  return true;
109 }
SGNODE * m_node
Definition: ifsg_node.h:57
void SetName(const char *aName)
Definition: sg_node.cpp:155

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.

88 {
89  wxCHECK( m_node, false );
90 
91  return m_node->SetParent( aParent );
92 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Set the parent SGNODE of this object.

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

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

◆ SetShininess()

bool IFSG_APPEARANCE::SetShininess ( float  aShininess)
noexcept

Definition at line 247 of file ifsg_appearance.cpp.

248 {
249  wxCHECK( m_node, false );
250 
251  if( aShininess < 0 || aShininess > 1.0 )
252  {
253  wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] shininess out of range [0..1]",
254  __FILE__, __FUNCTION__, __LINE__ );
255 
256  return false;
257  }
258 
259  ( (SGAPPEARANCE*) m_node )->shininess = aShininess;
260 
261  return true;
262 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

Referenced by WRL1MATERIAL::GetAppearance(), getColor(), DATA::GetColor(), EXPORTER_PCB_VRML::getSGColor(), WRL2APPEARANCE::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), and X3DAPP::TranslateToSG().

◆ SetSpecular() [1/3]

bool IFSG_APPEARANCE::SetSpecular ( float  aRVal,
float  aGVal,
float  aBVal 
)

Definition at line 199 of file ifsg_appearance.cpp.

200 {
201  wxCHECK( m_node, false );
202 
203  return ( (SGAPPEARANCE*) m_node )->SetSpecular( aRVal, aGVal, aBVal );
204 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

Referenced by WRL1MATERIAL::GetAppearance(), getColor(), DATA::GetColor(), EXPORTER_PCB_VRML::getSGColor(), WRL2APPEARANCE::TranslateToSG(), WRL2MATERIAL::TranslateToSG(), and X3DAPP::TranslateToSG().

◆ SetSpecular() [2/3]

bool IFSG_APPEARANCE::SetSpecular ( const SGCOLOR aRGBColor)

Definition at line 207 of file ifsg_appearance.cpp.

208 {
209  wxCHECK( m_node, false );
210 
211  return ( (SGAPPEARANCE*) m_node )->SetSpecular( aRGBColor );
212 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetSpecular() [3/3]

bool IFSG_APPEARANCE::SetSpecular ( const SGCOLOR aRGBColor)

Definition at line 215 of file ifsg_appearance.cpp.

216 {
217  wxCHECK( m_node, false );
218 
219  return ( (SGAPPEARANCE*) m_node )->SetSpecular( aRGBColor );
220 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

References IFSG_NODE::m_node.

◆ SetTransparency()

bool IFSG_APPEARANCE::SetTransparency ( float  aTransparency)
noexcept

Definition at line 265 of file ifsg_appearance.cpp.

266 {
267  wxCHECK( m_node, false );
268 
269  if( aTransparency < 0 || aTransparency > 1.0 )
270  {
271  wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] transparency out of range [0..1]",
272  __FILE__, __FUNCTION__, __LINE__ );
273 
274  return false;
275  }
276 
277  ( (SGAPPEARANCE*) m_node )->transparency = aTransparency;
278 
279  return true;
280 }
SGNODE * m_node
Definition: ifsg_node.h:57
Defines the generic material appearance of a scenegraph object.
Definition: sg_appearance.h:37

Referenced by WRL1MATERIAL::GetAppearance(), EXPORTER_PCB_VRML::getSGColor(), WRL2MATERIAL::TranslateToSG(), WRL2APPEARANCE::TranslateToSG(), and X3DAPP::TranslateToSG().

Member Data Documentation

◆ m_node

SGNODE* IFSG_NODE::m_node
protectedinherited

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