KiCad PCB EDA Suite
IFSG_TRANSFORM Class Reference

Class IFSG_TRANSFORM is the wrapper for the VRML compatible TRANSFORM block class SCENEGRAPH. More...

#include <ifsg_transform.h>

Inheritance diagram for IFSG_TRANSFORM:
IFSG_NODE

Public Member Functions

 IFSG_TRANSFORM (bool create)
 
 IFSG_TRANSFORM (SGNODE *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 SetScaleOrientation (const SGVECTOR &aScaleAxis, double aAngle)
 
bool SetRotation (const SGVECTOR &aRotationAxis, double aAngle)
 
bool SetScale (const SGPOINT &aScale)
 
bool SetScale (double aScale)
 
bool SetCenter (const SGPOINT &aCenter)
 
bool SetTranslation (const SGPOINT &aTranslation)
 
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_TRANSFORM is the wrapper for the VRML compatible TRANSFORM block class SCENEGRAPH.

Definition at line 40 of file ifsg_transform.h.

Constructor & Destructor Documentation

IFSG_TRANSFORM::IFSG_TRANSFORM ( bool  create)

Definition at line 38 of file ifsg_transform.cpp.

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

39 {
40  m_node = NULL;
41 
42  if( !create )
43  return;
44 
45  m_node = new SCENEGRAPH( NULL );
46 
47  if( m_node )
49 
50  return;
51 }
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_TRANSFORM::IFSG_TRANSFORM ( SGNODE aParent)

Definition at line 54 of file ifsg_transform.cpp.

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

55 {
56  m_node = new SCENEGRAPH( NULL );
57 
58  if( m_node )
59  {
60  if( !m_node->SetParent( aParent ) )
61  {
62  delete m_node;
63  m_node = NULL;
64 
65  #ifdef DEBUG
66  std::ostringstream ostr;
67  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
68  ostr << WrongParent;
69  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
70  #endif
71 
72  return;
73  }
74 
76  }
77 
78  return;
79 }
char WrongParent[]
Definition: ifsg_node.cpp:37
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.

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_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_TRANSFORM::Attach ( SGNODE aNode)
overridevirtual

Function Attach associates a given SGNODE* with this wrapper.

Implements IFSG_NODE.

Definition at line 82 of file ifsg_transform.cpp.

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

Referenced by MODEL_VRML::~MODEL_VRML().

83 {
84  if( m_node )
86 
87  m_node = NULL;
88 
89  if( !aNode )
90  return false;
91 
92  if( S3D::SGTYPE_TRANSFORM != aNode->GetNodeType() )
93  {
94  return false;
95  }
96 
97  m_node = aNode;
99 
100  return true;
101 }
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
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
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_TRANSFORM::NewNode ( SGNODE aParent)
overridevirtual

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

Implements IFSG_NODE.

Definition at line 104 of file ifsg_transform.cpp.

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

Referenced by NewNode().

105 {
106  if( m_node )
108 
109  m_node = new SCENEGRAPH( aParent );
110 
111  if( aParent != m_node->GetParent() )
112  {
113  #ifdef DEBUG
114  std::ostringstream ostr;
115  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
116  ostr << " * [BUG] invalid SGNODE parent (";
117  ostr << aParent->GetNodeTypeName( aParent->GetNodeType() );
118  ostr << ") to SCENEGRAPH";
119  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
120  #endif
121 
122  delete m_node;
123  m_node = NULL;
124  return false;
125  }
126 
128 
129  return true;
130 }
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_TRANSFORM::NewNode ( IFSG_NODE aParent)
overridevirtual

Implements IFSG_NODE.

Definition at line 133 of file ifsg_transform.cpp.

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

134 {
135  SGNODE* np = aParent.GetRawPtr();
136 
137  if( NULL == np )
138  {
139  #ifdef DEBUG
140  std::ostringstream ostr;
141  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
142  ostr << BadParent;
143  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
144  #endif
145 
146  return false;
147  }
148 
149  return NewNode( np );
150 }
SGNODE * GetRawPtr(void)
Function GetRawPtr() returns the raw internal SGNODE pointer.
Definition: ifsg_node.cpp:66
char BadParent[]
Definition: ifsg_node.cpp:36
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.
bool IFSG_TRANSFORM::SetCenter ( const SGPOINT aCenter)

Definition at line 267 of file ifsg_transform.cpp.

References BadObject, 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  ((SCENEGRAPH*)m_node)->center = aCenter;
282 
283  return true;
284 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
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
bool IFSG_TRANSFORM::SetRotation ( const SGVECTOR aRotationAxis,
double  aAngle 
)

Definition at line 153 of file ifsg_transform.cpp.

References BadObject, and IFSG_NODE::m_node.

Referenced by export_vrml_module().

154 {
155  if( NULL == m_node )
156  {
157  #ifdef DEBUG
158  std::ostringstream ostr;
159  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
160  ostr << BadObject;
161  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
162  #endif
163 
164  return false;
165  }
166 
167  ((SCENEGRAPH*)m_node)->rotation_axis = aRotationAxis;
168  ((SCENEGRAPH*)m_node)->rotation_angle = aAngle;
169 
170  return true;
171 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_TRANSFORM::SetScale ( const SGPOINT aScale)

Definition at line 174 of file ifsg_transform.cpp.

References BadObject, and IFSG_NODE::m_node.

Referenced by export_vrml_module(), and MODEL_VRML::SetScale().

175 {
176  if( NULL == m_node )
177  {
178  #ifdef DEBUG
179  std::ostringstream ostr;
180  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
181  ostr << BadObject;
182  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
183  #endif
184 
185  return false;
186  }
187 
188  ((SCENEGRAPH*)m_node)->scale = aScale;
189 
190  return true;
191 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_TRANSFORM::SetScale ( double  aScale)

Definition at line 194 of file ifsg_transform.cpp.

References BadObject, and IFSG_NODE::m_node.

195 {
196  if( NULL == m_node )
197  {
198  #ifdef DEBUG
199  std::ostringstream ostr;
200  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
201  ostr << BadObject;
202  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
203  #endif
204 
205  return false;
206  }
207 
208  if( aScale < 1e-8 && aScale > -1e-8 )
209  {
210  #ifdef DEBUG
211  std::ostringstream ostr;
212  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
213  ostr << " * [BUG] |scale| is < 1e-8 - this seems strange";
214  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
215  #endif
216 
217  return false;
218  }
219 
220  ((SCENEGRAPH*)m_node)->scale = SGPOINT( aScale, aScale, aScale );
221 
222  return true;
223 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_TRANSFORM::SetScaleOrientation ( const SGVECTOR aScaleAxis,
double  aAngle 
)

Definition at line 246 of file ifsg_transform.cpp.

References BadObject, and IFSG_NODE::m_node.

247 {
248  if( NULL == m_node )
249  {
250  #ifdef DEBUG
251  std::ostringstream ostr;
252  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
253  ostr << BadObject;
254  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
255  #endif
256 
257  return false;
258  }
259 
260  ((SCENEGRAPH*)m_node)->scale_axis = aScaleAxis;
261  ((SCENEGRAPH*)m_node)->scale_angle = aAngle;
262 
263  return true;
264 }
SGNODE * m_node
Definition: ifsg_node.h:57
char BadObject[]
Definition: ifsg_node.cpp:34
bool IFSG_TRANSFORM::SetTranslation ( const SGPOINT aTranslation)

Definition at line 226 of file ifsg_transform.cpp.

References BadObject, and IFSG_NODE::m_node.

Referenced by export_vrml_module().

227 {
228  if( NULL == m_node )
229  {
230  #ifdef DEBUG
231  std::ostringstream ostr;
232  ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
233  ostr << BadObject;
234  wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
235  #endif
236 
237  return false;
238  }
239 
240  ((SCENEGRAPH*)m_node)->translation = aTranslation;
241 
242  return true;
243 }
SGNODE * m_node
Definition: ifsg_node.h:57
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(), IFSG_COORDS::AddCoord(), IFSG_INDEX::AddIndex(), IFSG_NORMALS::AddNormal(), IFSG_NODE::AddRefNode(), IFSG_APPEARANCE::Attach(), IFSG_COORDS::Attach(), IFSG_COORDINDEX::Attach(), IFSG_NORMALS::Attach(), IFSG_FACESET::Attach(), IFSG_SHAPE::Attach(), IFSG_COLORS::Attach(), 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_NODE::GetRawPtr(), 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_SHAPE(), IFSG_TRANSFORM(), IFSG_APPEARANCE::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_SHAPE::NewNode(), IFSG_COLORS::NewNode(), NewNode(), IFSG_APPEARANCE::SetAmbient(), SetCenter(), IFSG_COLORS::SetColorList(), IFSG_COORDS::SetCoordsList(), IFSG_APPEARANCE::SetDiffuse(), IFSG_APPEARANCE::SetEmissive(), IFSG_INDEX::SetIndices(), IFSG_NODE::SetName(), IFSG_NORMALS::SetNormalList(), IFSG_NODE::SetParent(), SetRotation(), SetScale(), SetScaleOrientation(), IFSG_APPEARANCE::SetShininess(), IFSG_APPEARANCE::SetSpecular(), SetTranslation(), IFSG_APPEARANCE::SetTransparency(), and IFSG_NODE::~IFSG_NODE().


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