KiCad PCB EDA Suite
IFSG_COORDS Class Reference

Class IFSG_COORDS is the wrapper for SGCOORDS. More...

#include <ifsg_coords.h>

Inheritance diagram for IFSG_COORDS:
IFSG_NODE

Public Member Functions

 IFSG_COORDS (bool create)
 
 IFSG_COORDS (SGNODE *aParent)
 
 IFSG_COORDS (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 GetCoordsList (size_t &aListSize, SGPOINT *&aCoordsList)
 
bool SetCoordsList (size_t aListSize, const SGPOINT *aCoordsList)
 
bool AddCoord (double aXValue, double aYValue, double aZValue)
 
bool AddCoord (const SGPOINT &aPoint)
 
void Destroy (void)
 Function Destroy deletes the object held by this wrapper. More...
 
SGNODEGetRawPtr (void)
 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

Class IFSG_COORDS is the wrapper for SGCOORDS.

Definition at line 40 of file ifsg_coords.h.

Constructor & Destructor Documentation

IFSG_COORDS::IFSG_COORDS ( bool  create)

Definition at line 37 of file ifsg_coords.cpp.

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

38 {
39  m_node = NULL;
40 
41  if( !create )
42  return ;
43 
44  m_node = new SGCOORDS( NULL );
45 
46  if( m_node )
48 
49  return;
50 }
SGNODE * m_node
Definition: ifsg_node.h:57
void AssociateWrapper(SGNODE **aWrapperRef)
Function AssociateWrapper associates this object with a handle to itself; this handle is typically he...
Definition: sg_node.cpp:219
IFSG_COORDS::IFSG_COORDS ( SGNODE aParent)

Definition at line 53 of file ifsg_coords.cpp.

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

54 {
55  m_node = new SGCOORDS( NULL );
56 
57  if( m_node )
58  {
59  if( !m_node->SetParent( aParent ) )
60  {
61  delete m_node;
62  m_node = NULL;
63 
64  #ifdef DEBUG
65  std::ostringstream ostr;
66  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
67  ostr << WrongParent;
68  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
69  #endif
70 
71  return;
72  }
73 
75  }
76 
77  return;
78 }
SGNODE * m_node
Definition: ifsg_node.h:57
void AssociateWrapper(SGNODE **aWrapperRef)
Function AssociateWrapper associates this object with a handle to itself; this handle is typically he...
Definition: sg_node.cpp:219
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Function SetParent sets the parent SGNODE of this object.
char WrongParent[]
Definition: ifsg_node.cpp:37
IFSG_COORDS::IFSG_COORDS ( IFSG_NODE aParent)

Definition at line 81 of file ifsg_coords.cpp.

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

82 {
83  SGNODE* pp = aParent.GetRawPtr();
84 
85  #ifdef DEBUG
86  if( ! pp )
87  {
88  std::ostringstream ostr;
89  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
90  ostr << BadParent;
91  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
92  }
93  #endif
94 
95  m_node = new SGCOORDS( NULL );
96 
97  if( m_node )
98  {
99  if( !m_node->SetParent( pp ) )
100  {
101  delete m_node;
102  m_node = NULL;
103 
104  #ifdef DEBUG
105  std::ostringstream ostr;
106  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
107  ostr << WrongParent;
108  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
109  #endif
110 
111  return;
112  }
113 
115  }
116 
117  return;
118 }
SGNODE * GetRawPtr(void)
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:66
SGNODE * m_node
Definition: ifsg_node.h:57
Class SGNODE represents the base class of all Scene Graph nodes.
Definition: sg_node.h:76
void AssociateWrapper(SGNODE **aWrapperRef)
Function AssociateWrapper associates this object with a handle to itself; this handle is typically he...
Definition: sg_node.cpp:219
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Function SetParent sets the parent SGNODE of this object.
char WrongParent[]
Definition: ifsg_node.cpp:37
char BadParent[]
Definition: ifsg_node.cpp:36

Member Function Documentation

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 249 of file ifsg_node.cpp.

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

Referenced by export_vrml_module().

250 {
251  if( NULL == m_node )
252  {
253  #ifdef DEBUG
254  std::ostringstream ostr;
255  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
256  ostr << BadObject;
257  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
258  #endif
259 
260  return false;
261  }
262 
263  return m_node->AddChildNode( aNode );
264 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual bool AddChildNode(SGNODE *aNode)=0
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_NODE::AddChildNode ( IFSG_NODE aNode)
inherited

Definition at line 267 of file ifsg_node.cpp.

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

268 {
269  if( NULL == m_node )
270  {
271  #ifdef DEBUG
272  std::ostringstream ostr;
273  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
274  ostr << BadObject;
275  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
276  #endif
277 
278  return false;
279  }
280 
281  SGNODE* np = aNode.GetRawPtr();
282 
283  if( NULL == np )
284  {
285  #ifdef DEBUG
286  std::ostringstream ostr;
287  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
288  ostr << BadOperand;
289  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
290  #endif
291 
292  return false;
293  }
294 
295  return m_node->AddChildNode( np );
296 }
SGNODE * GetRawPtr(void)
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:66
char BadOperand[]
Definition: ifsg_node.cpp:35
SGNODE * m_node
Definition: ifsg_node.h:57
Class SGNODE represents the base class of all Scene Graph nodes.
Definition: sg_node.h:76
virtual bool AddChildNode(SGNODE *aNode)=0
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_COORDS::AddCoord ( double  aXValue,
double  aYValue,
double  aZValue 
)

Definition at line 230 of file ifsg_coords.cpp.

References BadObject, and IFSG_NODE::m_node.

Referenced by create_vrml_shell().

231 {
232  if( NULL == m_node )
233  {
234  #ifdef DEBUG
235  std::ostringstream ostr;
236  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
237  ostr << BadObject;
238  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
239  #endif
240 
241  return false;
242  }
243 
244  ((SGCOORDS*)m_node)->AddCoord( aXValue, aYValue, aZValue );
245 
246  return true;
247 }
char BadObject[]
Definition: ifsg_node.cpp:34
SGNODE * m_node
Definition: ifsg_node.h:57
bool IFSG_COORDS::AddCoord ( const SGPOINT aPoint)

Definition at line 250 of file ifsg_coords.cpp.

References BadObject, and IFSG_NODE::m_node.

251 {
252  if( NULL == m_node )
253  {
254  #ifdef DEBUG
255  std::ostringstream ostr;
256  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
257  ostr << BadObject;
258  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
259  #endif
260 
261  return false;
262  }
263 
264  ((SGCOORDS*)m_node)->AddCoord( aPoint );
265 
266  return true;
267 }
char BadObject[]
Definition: ifsg_node.cpp:34
SGNODE * m_node
Definition: ifsg_node.h:57
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 199 of file ifsg_node.cpp.

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

Referenced by export_vrml_module().

200 {
201  if( NULL == m_node )
202  {
203  #ifdef DEBUG
204  std::ostringstream ostr;
205  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
206  ostr << BadObject;
207  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
208  #endif
209 
210  return false;
211  }
212 
213  return m_node->AddRefNode( aNode );
214 }
virtual bool AddRefNode(SGNODE *aNode)=0
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_NODE::AddRefNode ( IFSG_NODE aNode)
inherited

Definition at line 217 of file ifsg_node.cpp.

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

218 {
219  if( NULL == m_node )
220  {
221  #ifdef DEBUG
222  std::ostringstream ostr;
223  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
224  ostr << BadObject;
225  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
226  #endif
227 
228  return false;
229  }
230 
231  SGNODE* np = aNode.GetRawPtr();
232 
233  if( NULL == np )
234  {
235  #ifdef DEBUG
236  std::ostringstream ostr;
237  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
238  ostr << BadOperand;
239  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
240  #endif
241 
242  return false;
243  }
244 
245  return m_node->AddRefNode( np );
246 }
SGNODE * GetRawPtr(void)
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:66
char BadOperand[]
Definition: ifsg_node.cpp:35
virtual bool AddRefNode(SGNODE *aNode)=0
SGNODE * m_node
Definition: ifsg_node.h:57
Class SGNODE represents the base class of all Scene Graph nodes.
Definition: sg_node.h:76
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_COORDS::Attach ( SGNODE aNode)
overridevirtual

Function Attach associates a given SGNODE* with this wrapper.

Implements IFSG_NODE.

Definition at line 121 of file ifsg_coords.cpp.

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

122 {
123  if( m_node )
125 
126  m_node = NULL;
127 
128  if( !aNode )
129  return false;
130 
131  if( S3D::SGTYPE_COORDS != aNode->GetNodeType() )
132  {
133  return false;
134  }
135 
136  m_node = aNode;
138 
139  return true;
140 }
SGNODE * m_node
Definition: ifsg_node.h:57
S3D::SGTYPES GetNodeType(void) const
Function GetNodeType returns the type of this node instance.
Definition: sg_node.cpp:108
void AssociateWrapper(SGNODE **aWrapperRef)
Function AssociateWrapper associates this object with a handle to itself; this handle is typically he...
Definition: sg_node.cpp:219
void DisassociateWrapper(SGNODE **aWrapperRef)
Function DisassociateWrapper removes the association between an IFSG* wrapper object and this object...
Definition: sg_node.cpp:264
void IFSG_NODE::Destroy ( void  )
inherited

Function Destroy deletes the object held by this wrapper.

Definition at line 54 of file ifsg_node.cpp.

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

Referenced by MODEL_VRML::~MODEL_VRML().

55 {
56  if( m_node )
58 
59  delete m_node;
60  m_node = NULL;
61 
62  return;
63 }
SGNODE * m_node
Definition: ifsg_node.h:57
void DisassociateWrapper(SGNODE **aWrapperRef)
Function DisassociateWrapper removes the association between an IFSG* wrapper object and this object...
Definition: sg_node.cpp:264
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
aCalleris a pointer to the node invoking this function
Returns
is a valid node pointer on success, otherwise NULL

Definition at line 181 of file ifsg_node.cpp.

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

182 {
183  if( NULL == m_node )
184  {
185  #ifdef DEBUG
186  std::ostringstream ostr;
187  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
188  ostr << BadObject;
189  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
190  #endif
191 
192  return NULL;
193  }
194 
195  return m_node->FindNode( aNodeName, NULL );
196 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual SGNODE * FindNode(const char *aNodeName, const SGNODE *aCaller)=0
Function FindNode searches the tree of linked nodes and returns a reference to the first node found w...
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_COORDS::GetCoordsList ( size_t &  aListSize,
SGPOINT *&  aCoordsList 
)

Definition at line 192 of file ifsg_coords.cpp.

References BadObject, and IFSG_NODE::m_node.

193 {
194  if( NULL == m_node )
195  {
196  #ifdef DEBUG
197  std::ostringstream ostr;
198  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
199  ostr << BadObject;
200  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
201  #endif
202 
203  return false;
204  }
205 
206  return ((SGCOORDS*)m_node)->GetCoordsList( aListSize, aCoordsList );
207 }
char BadObject[]
Definition: ifsg_node.cpp:34
SGNODE * m_node
Definition: ifsg_node.h:57
bool GetCoordsList(size_t &aListSize, SGPOINT *&aCoordsList)
const char * IFSG_NODE::GetName ( void  )
inherited

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

Definition at line 126 of file ifsg_node.cpp.

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

127 {
128  if( NULL == m_node )
129  {
130  #ifdef DEBUG
131  std::ostringstream ostr;
132  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
133  ostr << BadObject;
134  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
135  #endif
136 
137  return NULL;
138  }
139 
140  return m_node->GetName();
141 }
SGNODE * m_node
Definition: ifsg_node.h:57
const char * GetName(void)
Definition: sg_node.cpp:150
char BadObject[]
Definition: ifsg_node.cpp:34
S3D::SGTYPES IFSG_NODE::GetNodeType ( void  ) const
inherited

Function GetNodeType returns the type of this node instance.

Definition at line 72 of file ifsg_node.cpp.

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

73 {
74  if( NULL == m_node )
75  {
76  #ifdef DEBUG
77  std::ostringstream ostr;
78  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
79  ostr << BadObject;
80  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
81  #endif
82 
83  return S3D::SGTYPE_END;
84  }
85 
86  return m_node->GetNodeType();
87 }
SGNODE * m_node
Definition: ifsg_node.h:57
S3D::SGTYPES GetNodeType(void) const
Function GetNodeType returns the type of this node instance.
Definition: sg_node.cpp:108
char BadObject[]
Definition: ifsg_node.cpp:34
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 163 of file ifsg_node.cpp.

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

164 {
165  if( NULL == m_node )
166  {
167  #ifdef DEBUG
168  std::ostringstream ostr;
169  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
170  ostr << BadObject;
171  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
172  #endif
173 
174  return NULL;
175  }
176 
177  return m_node->GetNodeTypeName( aNodeType );
178 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
const char * GetNodeTypeName(S3D::SGTYPES aNodeType) const
Definition: sg_node.cpp:170
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 90 of file ifsg_node.cpp.

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

91 {
92  if( NULL == m_node )
93  {
94  #ifdef DEBUG
95  std::ostringstream ostr;
96  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
97  ostr << BadObject;
98  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
99  #endif
100 
101  return NULL;
102  }
103 
104  return m_node->GetParent();
105 }
SGNODE * m_node
Definition: ifsg_node.h:57
SGNODE * GetParent(void) const
Function GetParent returns a pointer to the parent SGNODE of this object or NULL if the object has no...
Definition: sg_node.cpp:114
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_COORDS::NewNode ( SGNODE aParent)
overridevirtual

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

Implements IFSG_NODE.

Definition at line 143 of file ifsg_coords.cpp.

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

Referenced by create_vrml_shell(), and NewNode().

144 {
145  if( m_node )
147 
148  m_node = new SGCOORDS( aParent );
149 
150  if( aParent != m_node->GetParent() )
151  {
152  #ifdef DEBUG
153  std::ostringstream ostr;
154  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
155  ostr << " * [BUG] invalid SGNODE parent (";
156  ostr << aParent->GetNodeTypeName( aParent->GetNodeType() );
157  ostr << ") to SGCOORDS";
158  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
159  #endif
160 
161  delete m_node;
162  m_node = NULL;
163  return false;
164  }
165 
167 
168  return true;
169 }
SGNODE * m_node
Definition: ifsg_node.h:57
S3D::SGTYPES GetNodeType(void) const
Function GetNodeType returns the type of this node instance.
Definition: sg_node.cpp:108
SGNODE * GetParent(void) const
Function GetParent returns a pointer to the parent SGNODE of this object or NULL if the object has no...
Definition: sg_node.cpp:114
void AssociateWrapper(SGNODE **aWrapperRef)
Function AssociateWrapper associates this object with a handle to itself; this handle is typically he...
Definition: sg_node.cpp:219
void DisassociateWrapper(SGNODE **aWrapperRef)
Function DisassociateWrapper removes the association between an IFSG* wrapper object and this object...
Definition: sg_node.cpp:264
const char * GetNodeTypeName(S3D::SGTYPES aNodeType) const
Definition: sg_node.cpp:170
bool IFSG_COORDS::NewNode ( IFSG_NODE aParent)
overridevirtual

Implements IFSG_NODE.

Definition at line 172 of file ifsg_coords.cpp.

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

173 {
174  SGNODE* np = aParent.GetRawPtr();
175 
176  if( NULL == np )
177  {
178  #ifdef DEBUG
179  std::ostringstream ostr;
180  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
181  ostr << BadParent;
182  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
183  #endif
184 
185  return false;
186  }
187 
188  return NewNode( np );
189 }
SGNODE * GetRawPtr(void)
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:66
Class SGNODE represents the base class of all Scene Graph nodes.
Definition: sg_node.h:76
bool NewNode(SGNODE *aParent) override
Function NewNode creates a new node to associate with this wrapper.
char BadParent[]
Definition: ifsg_node.cpp:36
bool IFSG_COORDS::SetCoordsList ( size_t  aListSize,
const SGPOINT aCoordsList 
)

Definition at line 210 of file ifsg_coords.cpp.

References BadObject, and IFSG_NODE::m_node.

Referenced by create_vrml_plane(), and create_vrml_shell().

211 {
212  if( NULL == m_node )
213  {
214  #ifdef DEBUG
215  std::ostringstream ostr;
216  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
217  ostr << BadObject;
218  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
219  #endif
220 
221  return false;
222  }
223 
224  ((SGCOORDS*)m_node)->SetCoordsList( aListSize, aCoordsList );
225 
226  return true;
227 }
char BadObject[]
Definition: ifsg_node.cpp:34
SGNODE * m_node
Definition: ifsg_node.h:57
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 144 of file ifsg_node.cpp.

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

145 {
146  if( NULL == m_node )
147  {
148  #ifdef DEBUG
149  std::ostringstream ostr;
150  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
151  ostr << BadObject;
152  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
153  #endif
154 
155  return false;
156  }
157 
158  m_node->SetName( aName );
159  return true;
160 }
SGNODE * m_node
Definition: ifsg_node.h:57
void SetName(const char *aName)
Definition: sg_node.cpp:159
char BadObject[]
Definition: ifsg_node.cpp:34
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 108 of file ifsg_node.cpp.

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

Referenced by MODEL_VRML::~MODEL_VRML().

109 {
110  if( NULL == m_node )
111  {
112  #ifdef DEBUG
113  std::ostringstream ostr;
114  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
115  ostr << BadObject;
116  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
117  #endif
118 
119  return false;
120  }
121 
122  return m_node->SetParent( aParent );
123 }
SGNODE * m_node
Definition: ifsg_node.h:57
virtual bool SetParent(SGNODE *aParent, bool notify=true)=0
Function SetParent sets the parent SGNODE of this object.
char BadObject[]
Definition: ifsg_node.cpp:34

Member Data Documentation

SGNODE* IFSG_NODE::m_node
protectedinherited

Definition at line 57 of file ifsg_node.h.

Referenced by IFSG_NODE::AddChildNode(), IFSG_COLORS::AddColor(), AddCoord(), IFSG_INDEX::AddIndex(), IFSG_NORMALS::AddNormal(), IFSG_NODE::AddRefNode(), IFSG_APPEARANCE::Attach(), Attach(), IFSG_COORDINDEX::Attach(), IFSG_NORMALS::Attach(), IFSG_FACESET::Attach(), IFSG_SHAPE::Attach(), IFSG_COLORS::Attach(), IFSG_TRANSFORM::Attach(), IFSG_FACESET::CalcNormals(), IFSG_NODE::Destroy(), IFSG_NODE::FindNode(), IFSG_COLORS::GetColorList(), GetCoordsList(), IFSG_INDEX::GetIndices(), IFSG_NODE::GetName(), IFSG_NODE::GetNodeType(), IFSG_NODE::GetNodeTypeName(), IFSG_NORMALS::GetNormalList(), IFSG_NODE::GetParent(), IFSG_NODE::GetRawPtr(), IFSG_APPEARANCE::IFSG_APPEARANCE(), IFSG_COLORS::IFSG_COLORS(), IFSG_COORDINDEX::IFSG_COORDINDEX(), IFSG_COORDS(), IFSG_FACESET::IFSG_FACESET(), IFSG_NODE::IFSG_NODE(), IFSG_NORMALS::IFSG_NORMALS(), IFSG_SHAPE::IFSG_SHAPE(), IFSG_TRANSFORM::IFSG_TRANSFORM(), IFSG_APPEARANCE::NewNode(), NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_SHAPE::NewNode(), IFSG_COLORS::NewNode(), IFSG_TRANSFORM::NewNode(), IFSG_APPEARANCE::SetAmbient(), IFSG_TRANSFORM::SetCenter(), IFSG_COLORS::SetColorList(), 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::SetShininess(), IFSG_APPEARANCE::SetSpecular(), IFSG_TRANSFORM::SetTranslation(), IFSG_APPEARANCE::SetTransparency(), and IFSG_NODE::~IFSG_NODE().


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